Stefan Dirsch
683dd399a9
- U_xwayland-Don-t-process-cursor-warping-without-an-xwl.patch, U_xwayland-Give-up-cleanly-on-Wayland-socket-errors.patch, U_xwayland-avoid-race-condition-on-new-keymap.patch, U_xwayland-remove-dirty-window-unconditionally-on-unre.patch: * Various crash and bug fixes in XWayland server (bgo#791383, bgo#790502). OBS-URL: https://build.opensuse.org/request/show/578983 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=692
43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
From 16fd18479d2f617adf0e6de922586441be3808eb Mon Sep 17 00:00:00 2001
|
|
From: Olivier Fourdan <ofourdan@redhat.com>
|
|
Date: Fri, 15 Dec 2017 16:43:47 +0100
|
|
Subject: [PATCH] xwayland: avoid race condition on new keymap
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
When the Wayland compositor notifies of a new keymap, for the first X11
|
|
client using the keyboard, the last slave keyboard used might still not
|
|
be set (i.e. “lastSlave” is still NULL).
|
|
|
|
As a result, the new keymap is not applied, and the first X11 window
|
|
will have the wrong keymap set initially.
|
|
|
|
Apply the new keymap to the master keyboard as long as there's one.
|
|
|
|
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=791383
|
|
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 170c95978530f6373bdf4488116902b273f3abf4)
|
|
---
|
|
hw/xwayland/xwayland-input.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
|
|
index f2564d5d3..d96e6f2a4 100644
|
|
--- a/hw/xwayland/xwayland-input.c
|
|
+++ b/hw/xwayland/xwayland-input.c
|
|
@@ -639,7 +639,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,
|
|
XkbDeviceApplyKeymap(xwl_seat->keyboard, xkb);
|
|
|
|
master = GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD);
|
|
- if (master && master->lastSlave == xwl_seat->keyboard)
|
|
+ if (master)
|
|
XkbDeviceApplyKeymap(master, xkb);
|
|
|
|
XkbFreeKeyboard(xkb, XkbAllComponentsMask, TRUE);
|
|
--
|
|
2.16.1
|
|
|