From 27d4e6e8ca3819fe55c6b95f1aa135a765bab119 Mon Sep 17 00:00:00 2001 From: Boyan Ding Date: Sat, 28 Jun 2014 16:33:58 +0800 Subject: [PATCH] xwayland: Initialize device when reprobing 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 --- 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; } -- 2.0.1