xserver-multidpi/hw/xwayland
Olivier Fourdan 007f8ee61a xwayland: Activate and enable touch devices
On some random condition, a touch event may trigger a crash in Xwayland
in GetTouchEvents().

The (simplified) backtrace goes as follow:

 (gdb) bt
 #0  GetTouchEvents() at getevents.c:1892
 #1  QueueTouchEvents() at getevents.c:1866
 #2  xwl_touch_send_event() at xwayland-input.c:652
 #5  wl_closure_invoke() from libwayland-client.so.0
 #6  dispatch_event() from libwayland-client.so.0
 #7  wl_display_dispatch_queue_pending() from libwayland-client.so.0
 #8  xwl_read_events() at xwayland.c:483
 #9  ospoll_wait() at ospoll.c:412
 #10 WaitForSomething() at WaitFor.c:222
 #11 Dispatch() at dispatch.c:412
 #12 dix_main() at main.c:287
 #13 __libc_start_main() at libc-start.c:289
 #14 _start ()

The crash occurs when trying to access the sprite associated with the
touch device, which appears to be NULL. Reason being the device itself
is more a keyboard device than a touch device.

Moreover, it appears the device is neither enabled nor activated
(inited=0, enabled=0) which doesn't seem right, but matches the code in
init_touch() from xwayland-input.c which would enable the device if it
was previously existing and otherwise would create the device but not
activate it.

Make sure we do activate and enable touch devices just like we do for
other input devices such as keyboard and pointer.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-10-26 13:01:54 -04:00
..
.gitignore xwayland: Bind pointer constraints global 2016-10-05 13:50:46 -04:00
drm.xml xwayland: Add glamor and DRI3 support 2014-06-24 15:09:55 -07:00
Makefile.am xwayland: Bind pointer constraints global 2016-10-05 13:50:46 -04:00
xwayland-cursor.c xwayland: Add pointer warp emulator 2016-10-05 13:51:02 -04:00
xwayland-cvt.c xwayland: do not include frequency in mode name 2016-03-28 14:09:09 -04:00
xwayland-glamor-xv.c xwayland: Fix compiler warning in GLAMOR Xv 2016-04-15 16:22:16 -04:00
xwayland-glamor.c glamor: Use eglGetPlatformDisplay{,EXT} if we can 2016-10-05 16:03:13 -04:00
xwayland-input.c xwayland: Activate and enable touch devices 2016-10-26 13:01:54 -04:00
xwayland-output.c xwayland: Avoid double free of RRCrtc and RROutput 2016-08-15 14:20:54 -04:00
xwayland-shm.c xwayland: Close the shm fd as early as possible 2016-09-28 14:23:59 -04:00
xwayland-vidmode.c xwayland: Pretend we support viewport in vidmode 2016-03-28 14:10:59 -04:00
xwayland.c xwayland: Add pointer warp emulator 2016-10-05 13:51:02 -04:00
xwayland.h xwayland: Add pointer warp emulator 2016-10-05 13:51:02 -04:00