diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-05 18:54:30 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-13 13:24:00 +1000 |
commit | 6eff14a789341d366b3013c5aa020e959c954651 (patch) | |
tree | 90c9beb476a5eb601ad610780cc0f921e806ab62 | |
parent | 93945b0a74aa8156a88f52b8ba77f1210042f396 (diff) |
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>
-rw-r--r-- | dix/events.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/dix/events.c b/dix/events.c index 37039c6cf..6e015fea2 100644 --- a/dix/events.c +++ b/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) { |