Bug 93539 - XInput 2 NotifyPointer events are not sent to the pointer window
Summary: XInput 2 NotifyPointer events are not sent to the pointer window
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-30 06:06 UTC by Andrew Comminos
Modified: 2016-07-06 16:20 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Andrew Comminos 2015-12-30 06:06:27 UTC
In the XInput 2 event dispatching code, we propagate focus out events starting from the child's parent up to (but excluding) the ancestor window (see DeviceFocusOutEvents). However, NotifyPointer focus out events should also be sent to the window containing the pointer (the child itself), as performed by the core input event system.

This surfaced as a bug in Firefox/GTK3 that caused focus handing to fail due to a missing FocusOut (detail=NotifyPointer) event when focus was moved from PointerRoot to another toplevel after a window's destruction. As a GTK window's focus is changed when a NotifyPointer event occurs on a window, this was causing the window to permanently retain focus (according to GTK, at least). This does not occur on the core/non-xi2 backend, which does send NotifyPointer focus out events to the pointer window.

The events that should occur when moving from PointerRoot to another window are detailed quite well here;

https://tronche.com/gui/x/xlib/events/input-focus/normal-and-grabbed.html
Comment 1 Karl Tomlinson 2016-05-05 05:46:31 UTC
Patch at https://lists.x.org/archives/xorg-devel/2015-December/048389.html
Comment 2 Adam Jackson 2016-07-06 16:20:42 UTC
commit 2fbf5c2f91d33efbda573c4be036248b1d8ed7f1
Author: Andrew Comminos <andrew@comminos.com>
Date:   Tue Dec 29 23:41:27 2015 -0800

    Input: Send XI2 FocusOut NotifyPointer events to the pointer window.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.