dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents
No functional change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
93945b0a74
commit
6eff14a789
18
dix/events.c
18
dix/events.c
|
@ -4156,6 +4156,7 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
|
|||
if (grab->ownerEvents)
|
||||
{
|
||||
WindowPtr focus;
|
||||
WindowPtr win;
|
||||
|
||||
/* 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
|
||||
|
@ -4172,15 +4173,16 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
|
|||
else
|
||||
focus = PointerRootWin;
|
||||
if (focus == PointerRootWin)
|
||||
deliveries = DeliverDeviceEvents(pSprite->win, event, grab,
|
||||
NullWindow, thisDev);
|
||||
else if (focus && (focus == pSprite->win ||
|
||||
IsParent(focus, pSprite->win)))
|
||||
deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus,
|
||||
thisDev);
|
||||
{
|
||||
win = pSprite->win;
|
||||
focus = NullWindow;
|
||||
} else if (focus && (focus == pSprite->win ||
|
||||
IsParent(focus, pSprite->win)))
|
||||
win = pSprite->win;
|
||||
else if (focus)
|
||||
deliveries = DeliverDeviceEvents(focus, event, grab, focus,
|
||||
thisDev);
|
||||
win = focus;
|
||||
|
||||
deliveries = DeliverDeviceEvents(win, event, grab, focus, thisDev);
|
||||
}
|
||||
if (!deliveries)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue