Skip to content

Commit

Permalink
xwayland: do not set checkRepeat on master kbd
Browse files Browse the repository at this point in the history
keyboard_check_repeat() fetches the XWayland seat from the
dev->public.devicePrivate do do its thing.

If a key event is sent programmatically through Xtest, our device is the
virtual core keyboard and that has a dev->public.devicePrivate of NULL,
leading to a segfault in keyboard_check_repeat().

This is the case with "antimicro" which sends key events based on the
joystick buttons.

Don't set the checkRepeat handler on the VCK since it cannot possibly work
anyway and it has no effect on the actual checkRepeat intended functionality.

Bugzilla: https://bugzilla.redhat.com/1416244
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
ofourdan authored and whot committed Mar 1, 2017
1 parent 2781995 commit fe5c340
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions hw/xwayland/xwayland-input.c
Expand Up @@ -1027,8 +1027,6 @@ release_relative_pointer(struct xwl_seat *xwl_seat)
static void
init_keyboard(struct xwl_seat *xwl_seat)
{
DeviceIntPtr master;

xwl_seat->wl_keyboard = wl_seat_get_keyboard(xwl_seat->seat);
wl_keyboard_add_listener(xwl_seat->wl_keyboard,
&keyboard_listener, xwl_seat);
Expand All @@ -1040,9 +1038,6 @@ init_keyboard(struct xwl_seat *xwl_seat)
}
EnableDevice(xwl_seat->keyboard, TRUE);
xwl_seat->keyboard->key->xkbInfo->checkRepeat = keyboard_check_repeat;
master = GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD);
if (master)
master->key->xkbInfo->checkRepeat = keyboard_check_repeat;
}

static void
Expand Down

0 comments on commit fe5c340

Please sign in to comment.