xserver-multidpi/Xi
Ben Gamari c1d30b5bd7 Xi: Don't ActivateEarlyAccept POINTER_REGULAR listeners
Bug #71878 describes a bug resulting in the server ceasing to respond to
keyboard input after a touch event. The problem might be the following:

DeliverTouchBeginEvent tries to deliver an event to a listener of type
LISTENER_POINTER_REGULAR, taking the following if branch,

    if (listener->type == LISTENER_POINTER_REGULAR ||
        listener->type == LISTENER_POINTER_GRAB) {
        rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win,
                                       grab, xi2mask);
        if (rc == Success) {
            listener->state = LISTENER_IS_OWNER;
            /* async grabs cannot replay, so automatically accept this touch */
            if (dev->deviceGrab.grab &&
                dev->deviceGrab.fromPassiveGrab &&
                dev->deviceGrab.grab->pointerMode == GrabModeAsync)
                ActivateEarlyAccept(dev, ti);
        }
        goto out;
    }

DeliverTouchEmulatedEvent succeeds.  The deviceGrab meets all
three of the conditions of the inner if, enters
ActivateEarlyAccept which then fails due to,

    BUG_RETURN(ti->listeners[0].type != LISTENER_GRAB &&
               ti->listeners[0].type != LISTENER_POINTER_GRAB);

That is, despite listener->type == LISTENER_POINTER_REGULAR. With my
non-existent knowledge of XINPUT, it seems like the solution here
might be to only ActivateEarlyAccept when listener->type ==
LISTENER_POINTER_GRAB.

Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-11 14:00:50 +10:00
..
allowev.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
allowev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
chgdctl.c Xi: always return BadMatch for XTest devices ChangeDeviceControl requests 2013-05-07 09:40:44 +10:00
chgdctl.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
chgfctl.c Indentation: Change '& stuff' to '&stuff' 2012-03-21 14:02:30 -07:00
chgfctl.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
chgkbd.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
chgkbd.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
chgkmap.c Indentation: Change '& stuff' to '&stuff' 2012-03-21 14:02:30 -07:00
chgkmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
chgprop.c Indentation: Change '& stuff' to '&stuff' 2012-03-21 14:02:30 -07:00
chgprop.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
chgptr.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
chgptr.h Xi: Remove redundant declaration. 2012-05-14 13:17:30 +01:00
closedev.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
closedev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
devbell.c Never try to execute BellProcPtr NULL. 2013-04-15 13:30:58 +10:00
devbell.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
exevents.c Xi: Don't ActivateEarlyAccept POINTER_REGULAR listeners 2013-12-11 14:00:50 +10:00
exglobals.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
extinit.c Xi: free barrier code at reset time 2013-05-07 09:41:19 +10:00
getbmap.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
getbmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
getdctl.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
getdctl.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
getfctl.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
getfctl.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
getfocus.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
getfocus.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
getkmap.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
getkmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
getmmap.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
getmmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
getprop.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
getprop.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
getselev.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
getselev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
getvers.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
getvers.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
grabdev.c Xi: replace loop with memset 2013-08-30 14:26:55 +10:00
grabdev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
grabdevb.c Use C99 designated initializers in extension Events 2012-07-09 22:52:30 -07:00
grabdevb.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
grabdevk.c Use C99 designated initializers in extension Events 2012-07-09 22:52:30 -07:00
grabdevk.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
gtmotion.c Fix formatting of address operators 2012-12-05 18:09:48 -06:00
gtmotion.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
listdev.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
listdev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Makefile.am cursor: Move pointer barrier code over to XI 2012-12-17 15:01:22 +10:00
opendev.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
opendev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
queryst.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
queryst.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
selectev.c Indentation: Change '& stuff' to '&stuff' 2012-03-21 14:02:30 -07:00
selectev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
sendexev.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
sendexev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
setbmap.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
setbmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
setdval.c Xi: always return BadMatch for XTest devices ChangeDeviceControl requests 2013-05-07 09:40:44 +10:00
setdval.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
setfocus.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
setfocus.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
setmmap.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
setmmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
setmode.c Xi: always return BadMatch for XTest devices ChangeDeviceControl requests 2013-05-07 09:40:44 +10:00
setmode.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
stubs.c Xi: make stub DeleteInputDeviceRequest call RemoveDevice 2012-05-24 14:57:11 +10:00
ungrdev.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
ungrdev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
ungrdevb.c dix: AllocGrab can copy if an argument is passed in 2013-05-10 14:32:37 +10:00
ungrdevb.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
ungrdevk.c dix: AllocGrab can copy if an argument is passed in 2013-05-10 14:32:37 +10:00
ungrdevk.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xiallowev.c Xi: allow for XIAllowEvent requests larger than XI < 2.2 size (#68554) 2013-08-30 14:26:55 +10:00
xiallowev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xibarriers.c Xi: free barrier code at reset time 2013-05-07 09:41:19 +10:00
xibarriers.h Xi: free barrier code at reset time 2013-05-07 09:41:19 +10:00
xichangecursor.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xichangecursor.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xichangehierarchy.c Merge remote-tracking branch 'yselkowitz/master' 2012-12-19 12:22:03 -08:00
xichangehierarchy.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xigetclientpointer.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
xigetclientpointer.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xigrabdev.c Xi: fix swapped grab mode args for keyboard devices in XIGrabDevice 2013-04-15 10:21:48 +10:00
xigrabdev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xipassivegrab.c dix: AllocGrab can copy if an argument is passed in 2013-05-10 14:32:37 +10:00
xipassivegrab.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xiproperty.c Add missing labels for multitouch valuators 2012-10-30 15:11:10 +10:00
xiproperty.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xiquerydevice.c Fix formatting of address operators 2012-12-05 18:09:48 -06:00
xiquerydevice.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xiquerypointer.c input: drop FP1616 macro 2012-11-19 12:12:23 +10:00
xiquerypointer.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xiqueryversion.c Xi: Clamp XIClient maximal version to XIVersion 2013-08-01 14:51:41 +10:00
xiqueryversion.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xiselectev.c Xi: fix touch event selction conflicts (#57301) 2012-12-12 17:25:16 +10:00
xiselectev.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xisetclientpointer.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xisetclientpointer.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xisetdevfocus.c Use C99 designated initializers in Xinput Replies 2012-07-09 19:58:30 -07:00
xisetdevfocus.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xiwarppointer.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xiwarppointer.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00