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)
|
if (grab->ownerEvents)
|
||||||
{
|
{
|
||||||
WindowPtr focus;
|
WindowPtr focus;
|
||||||
|
WindowPtr win;
|
||||||
|
|
||||||
/* Hack: Some pointer device have a focus class. So we need to check
|
/* 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
|
* 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
|
else
|
||||||
focus = PointerRootWin;
|
focus = PointerRootWin;
|
||||||
if (focus == PointerRootWin)
|
if (focus == PointerRootWin)
|
||||||
deliveries = DeliverDeviceEvents(pSprite->win, event, grab,
|
{
|
||||||
NullWindow, thisDev);
|
win = pSprite->win;
|
||||||
else if (focus && (focus == pSprite->win ||
|
focus = NullWindow;
|
||||||
IsParent(focus, pSprite->win)))
|
} else if (focus && (focus == pSprite->win ||
|
||||||
deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus,
|
IsParent(focus, pSprite->win)))
|
||||||
thisDev);
|
win = pSprite->win;
|
||||||
else if (focus)
|
else if (focus)
|
||||||
deliveries = DeliverDeviceEvents(focus, event, grab, focus,
|
win = focus;
|
||||||
thisDev);
|
|
||||||
|
deliveries = DeliverDeviceEvents(win, event, grab, focus, thisDev);
|
||||||
}
|
}
|
||||||
if (!deliveries)
|
if (!deliveries)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue