[BUG] Touchscreen woes
Peter Hutterer
peter.hutterer at who-t.net
Sun Dec 1 16:01:19 PST 2013
On Sat, Nov 30, 2013 at 09:24:44AM -0500, Ben Gamari wrote:
> Peter Hutterer <peter.hutterer at who-t.net> writes:
>
> > On 30/11/2013 02:42 , Ben Gamari wrote:
> >> It seems that when keyboard input is in its paused state only the
> >> device events are delivered. The core keyboard events are only
> >> delivered after another mouse event has occurred.
> >
> > ok, what's happening here is that (most likely) the device is frozen.
> > Event delivery works that for each event, dev->public.processInputProc
> > is called. That is usually ProcessOtherEvents(), but if the device is
> > frozen from a sync grab, that func is EnqueueEvents(). You'll likely
> > fine that the core keyboard events are going there. Once unfrozen, the
> > events are replayed as you see below.
> >
> > most likely what's happening here is that the grab is stuck and xmonad
> > doesn't send the AllowEvents because it didn't get an event it expected.
> > the xscope output may help here to figure out what it is registering for.
> >
> This is what the xscope'd xmonad process produces around the time of a
> window switch. These are the only keyboard-synchronous grabs I've been
> able to find. Regardless, it looks to me like the UngrabButton request
> should really kill any grabs that were established.
that'd actually be against the spec. From XUngrabButton(3): "XUngrabButton
has no effect on an active grab."
think of passive grabs as working only on future button presses. XGrabButton
is akin to "next time this button is pressed, establish a grab" and
XUngrabButton is essentially "stop doing that from now on". If a button is
already down (and a grab established), XUngrabButton has no effect.
As mentioned on IRC, I've got a reliable reproducer for this now so I'll
look into it. The issue is that when the ButtonRelease is processed, the
grab should be released and thus replay the keyboard events. For the mouse
case that works, but when the emulated touch events doesn't trigger the
right conditions. I'll look into this.
Cheers,
Peter
> ............REQUEST: ConfigureWindow
> window: WIN 02200024
> value-mask: x | y | width | height
> value-list:
> x: 960
> y: 25
> width: 03be
> height: 041d
> ............REQUEST: ChangeWindowAttributes
> window: WIN 02200024
> value-mask: border-pixel
> value-list:
> border-pixel: 000033ff
> ............REQUEST: ChangeProperty
> mode: Replace
> window: WIN 01a00024
> property: <WM_STATE>
> type: <WM_STATE>
> format: 20
> data: 01 00 00 00 00 00 00 00
> ............REQUEST: MapWindow
> window: WIN 01a00024
> ............REQUEST: ChangeProperty
> mode: Replace
> window: WIN 02200024
> property: <WM_STATE>
> type: <WM_STATE>
> format: 20
> data: 01 00 00 00 00 00 00 00
> ............REQUEST: MapWindow
> window: WIN 02200024
> ............REQUEST: GrabButton
> owner-events: False
> grab-window: WIN 01a00024
> event-mask: ButtonPress
> pointer-mode: Asynchronous
> keyboard-mode: Synchronous
> confine-to: None
> cursor: None
> button: 1 (^A)
> modifiers: AnyModifier
> ............REQUEST: GrabButton
> owner-events: False
> grab-window: WIN 01a00024
> event-mask: ButtonPress
> pointer-mode: Asynchronous
> keyboard-mode: Synchronous
> confine-to: None
> cursor: None
> button: 2 (^B)
> modifiers: AnyModifier
> ............REQUEST: GrabButton
> owner-events: False
> grab-window: WIN 01a00024
> event-mask: ButtonPress
> pointer-mode: Asynchronous
> keyboard-mode: Synchronous
> confine-to: None
> cursor: None
> button: 3 (^C)
> modifiers: AnyModifier
> ............REQUEST: GrabButton
> owner-events: False
> grab-window: WIN 02200024
> event-mask: ButtonPress
> pointer-mode: Asynchronous
> keyboard-mode: Synchronous
> confine-to: None
> cursor: None
> button: 1 (^A)
> modifiers: AnyModifier
> ............REQUEST: GrabButton
> owner-events: False
> grab-window: WIN 02200024
> event-mask: ButtonPress
> pointer-mode: Asynchronous
> keyboard-mode: Synchronous
> confine-to: None
> cursor: None
> button: 2 (^B)
> modifiers: AnyModifier
> ............REQUEST: GrabButton
> owner-events: False
> grab-window: WIN 02200024
> event-mask: ButtonPress
> pointer-mode: Asynchronous
> keyboard-mode: Synchronous
> confine-to: None
> cursor: None
> button: 3 (^C)
> modifiers: AnyModifier
> ............REQUEST: UngrabButton
> button: AnyButton
> grab-window: WIN 02200024
> modifiers: AnyModifier
More information about the xorg
mailing list