dix: Dont deliver grabbed pointer events to a focus window.
If an pointer event is being processed during a device grab, don't deliver it to the focus window, even if the device has a focus class. Reason being that some pointers may have a focus class, thus killing drag-and-drop.
This commit is contained in:
parent
df2545b98d
commit
cc7dab2d04
13
dix/events.c
13
dix/events.c
|
@ -3686,7 +3686,18 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev,
|
|||
{
|
||||
WindowPtr focus;
|
||||
|
||||
if (thisDev->focus)
|
||||
/* Hack: Some pointer device have a focus class. So we need to check
|
||||
* for the type of event, to see if we really want to deliver it to
|
||||
* the focus window. For pointer events, the answer is no.
|
||||
*/
|
||||
if (xE->u.u.type == DeviceButtonPress ||
|
||||
xE->u.u.type == DeviceButtonRelease ||
|
||||
xE->u.u.type == DeviceMotionNotify ||
|
||||
xE->u.u.type == ProximityIn ||
|
||||
xE->u.u.type == ProximityOut)
|
||||
{
|
||||
focus = PointerRootWin;
|
||||
} else if (thisDev->focus)
|
||||
{
|
||||
focus = thisDev->focus->win;
|
||||
if (focus == FollowKeyboardWin)
|
||||
|
|
Loading…
Reference in New Issue