Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XKeycodeToKeysym is deprecated #7

Open
morgant opened this issue Dec 27, 2020 · 1 comment
Open

XKeycodeToKeysym is deprecated #7

morgant opened this issue Dec 27, 2020 · 1 comment
Assignees

Comments

@morgant
Copy link
Owner

morgant commented Dec 27, 2020

There is currently one warning in mlvwm/event.c when compiling with clang on OpenBSD 6.8:

event.c:1791:26: warning: 'XKeycodeToKeysym' is deprecated [-Wdeprecated-declarations]
                        XKeysymToKeycode(dpy, XKeycodeToKeysym(dpy,ev->xkey.keycode,0));
                                              ^
/usr/X11R6/include/X11/Xlib.h:1686:1: note: 'XKeycodeToKeysym' has been explicitly marked deprecated here
_X_DEPRECATED
^
/usr/X11R6/include/X11/Xfuncproto.h:136:40: note: expanded from macro '_X_DEPRECATED'
# define _X_DEPRECATED  __attribute__((deprecated))
@morgant morgant added the bug label Dec 27, 2020
@morgant morgant added this to the 0.9.2 milestone Dec 27, 2020
@morgant morgant self-assigned this Dec 27, 2020
@morgant
Copy link
Owner Author

morgant commented Dec 27, 2020

There are some XKeycodeToKeysym alternatives discussed in this Stack Overflow question.

fvwm on OpenBSD is still using XKeycodeToKeysym, so no direction there, but the comment for its usage (which is retained in mlvwm, less the comment) is interesting:

/* Here's a real hack - some systems have two keys with the
 * same keysym and different keycodes. This converts all
 * the cases to one keycode. */

I think that converting to XGetKeyboardMapping() is the correct solution as XKB is not available on all platforms, but I'll need to understand it better to see if we can reimplement the hack using it.

@morgant morgant removed this from the 0.9.2 milestone Dec 27, 2020
@morgant morgant removed the bug label Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant