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

XkbGetKeyboard can return NULL #389

Closed
linkmauve opened this issue Nov 28, 2014 · 9 comments

Comments

@linkmauve
Copy link
Member

commented Nov 28, 2014

On Xwayland, it makes glfw segfault in:
#0 updateKeyCodeLUT () at /home/linkmauve/dev/glfw/src/x11_init.c:252

@elmindreda elmindreda added this to the 3.2 milestone Nov 30, 2014
@elmindreda elmindreda self-assigned this Dec 1, 2014
@elmindreda elmindreda removed the unverified label Jan 9, 2015
@fooishbar

This comment has been minimized.

Copy link

commented Jan 29, 2015

The reason this returns NULL is because we don't send the map name at all in Wayland; in fact, it may not have originally been XKB. Using XkbGetMap instead of XkbGetKeyboard will fix that.

@elmindreda

This comment has been minimized.

Copy link
Member

commented Jan 30, 2015

@fooishbar Thank you, and interesting blog!

@fooishbar

This comment has been minimized.

Copy link

commented Jan 30, 2015

@elmindreda Heh, thanks. Also note that using XkbGetMap() instead will actually fix a real bug with X11: when you get the keyboard name and compile it yourself, this will ignore any modifications that users have made themselves with xmodmap or setting local XKB maps. Calling XkbGetMap() is the only way to guarantee that you're using the exact same keymap as the server and clients in general.

@elmindreda elmindreda added the verified label Jan 31, 2015
@elmindreda

This comment has been minimized.

Copy link
Member

commented Jun 28, 2015

This has now been seen in the wild.

@elmindreda elmindreda modified the milestones: 3.1.2, 3.2 Jun 28, 2015
elmindreda added a commit that referenced this issue Aug 18, 2015
Switch to XkbGetMap as XkbGetKeyboard returns NULL on XWayland.

Fixes #389.
@elmindreda

This comment has been minimized.

Copy link
Member

commented Aug 18, 2015

@fooishbar Does 252ccb7 look right?

@fooishbar

This comment has been minimized.

Copy link

commented Aug 18, 2015

Yep, looks fine to me! Note that you can't necessarily rely on the names
being sensible (or non-empty) but the rest seems great.
On Tue, 18 Aug 2015 at 12:37 pm Camilla Berglund notifications@github.com
wrote:

@fooishbar https://github.com/fooishbar Does 252ccb7
252ccb7
look right?


Reply to this email directly or view it on GitHub
#389 (comment).

@elmindreda

This comment has been minimized.

Copy link
Member

commented Aug 18, 2015

@fooishbar There is a fallback. I don't yet know enough XKB to properly evaluate it, though.

@elmindreda

This comment has been minimized.

Copy link
Member

commented Aug 18, 2015

@fooishbar Thank you for all your help!

@fooishbar

This comment has been minimized.

Copy link

commented Aug 18, 2015

Fallback looks fine to me. And, no problem! :)
On Tue, 18 Aug 2015 at 1:30 pm Camilla Berglund notifications@github.com
wrote:

@fooishbar https://github.com/fooishbar Thank you for all your help!


Reply to this email directly or view it on GitHub
#389 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.