mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-28 19:05:51 +01:00
WINGs: Add W_KeycodeToKeysym to replace XKeycodeToKeysym/XkbKeycodeToKeysym calls
XKeycodeToKeysym was deprecated some time ago and we replaced those function calls to XkbKeycodeToKeysym. Usage of XkbKeycodeToKeysym is not the best as it appears the XKEYBOARD can be disabled via xorg.conf (at least on Linux). So just replacing XKeycodeToKeysym() with XkbKeycodeToKeysym() could cause run-time errors on top of the compilation warning we may have. Better fix is to address the problem without introducing a dependency on XKEYBOARD. W_KeycodeToKeysym is the equivalent code for XKeycodeToKeysym/XkbKeycodeToKeysym using XGetKeyboardMapping instead. As a new function is added to the library WINGs library version is bumped.
This commit is contained in:
committed by
Carlos R. Mafra
parent
2dd98666f1
commit
15d06ff064
@@ -26,7 +26,7 @@
|
||||
#include <WINGs/WUtil.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#define WINGS_H_VERSION 20210726
|
||||
#define WINGS_H_VERSION 20230226
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -494,6 +494,8 @@ void W_SetPreeditPositon(W_View *view, int x, int y);
|
||||
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer,
|
||||
int buflen, KeySym *keysym, Status *status);
|
||||
|
||||
KeySym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index);
|
||||
|
||||
|
||||
/* ---[ wmisc.c ]--------------------------------------------------------- */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user