[PATCH] xwayland: Initialize device when reprobing

Boyan Ding stu_dby at 126.com
Sat Jun 28 23:06:10 PDT 2014

Actions like VT switches can somehow make weston reprobe input devices,
and cause xwayland create new devices, which, unlike the initial ones,
goes uninitialized. This will make xwayland crash when it uses the new
devices. This patch activates and enables the devices after they
are created thus eliminates the problem.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=79609
Signed-off-by: Boyan Ding <stu_dby at 126.com>
 hw/xwayland/xwayland-input.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 990cb82..bbd9486 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -482,6 +482,9 @@ add_device(struct xwl_seat *xwl_seat,
     dev->type = SLAVE;
     dev->spriteInfo->spriteOwner = FALSE;
+    ActivateDevice(dev, FALSE);
+    EnableDevice(dev, FALSE);
     return dev;

More information about the xorg-devel mailing list