summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2017-03-01 08:51:31 +0100
committerAdam Jackson <ajax@redhat.com>2017-03-02 14:54:29 -0500
commite4dd73b242522942d9a5f1c9cada92321710a682 (patch)
tree8460e35530506bd40fd38c6482e7346902367e16
parentc84f5c3dd19ae114da4eb3441b3e4e3a29f195df (diff)
xwayland: do not set checkRepeat on master kbd
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> (cherry picked from commit fe5c340046c8cf755b92763a49b2dc475e856a76)
-rw-r--r--hw/xwayland/xwayland-input.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index ce0e433b8..f06e88aa5 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -1033,8 +1033,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);
@@ -1046,9 +1044,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