• Olivier Fourdan's avatar
    xwayland: Activate and enable touch devices · 007f8ee6
    Olivier Fourdan authored
    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: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    007f8ee6
Name
Last commit
Last update
Xext Loading commit data...
Xi Loading commit data...
composite Loading commit data...
config Loading commit data...
damageext Loading commit data...
dbe Loading commit data...
dix Loading commit data...
doc Loading commit data...
dri3 Loading commit data...
exa Loading commit data...
fb Loading commit data...
glamor Loading commit data...
glx Loading commit data...
hw Loading commit data...
include Loading commit data...
m4 Loading commit data...
man Loading commit data...
mi Loading commit data...
miext Loading commit data...
os Loading commit data...
present Loading commit data...
pseudoramiX Loading commit data...
randr Loading commit data...
record Loading commit data...
render Loading commit data...
test Loading commit data...
xfixes Loading commit data...
xkb Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
COPYING Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
devbook.am Loading commit data...
docbook.am Loading commit data...
fix-miregion Loading commit data...
fix-miregion-private Loading commit data...
fix-patch-whitespace Loading commit data...
fix-region Loading commit data...
manpages.am Loading commit data...
xorg-server.m4 Loading commit data...
xorg-server.pc.in Loading commit data...
xserver.ent.in Loading commit data...