summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-02-04 19:27:21 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-02-08 18:04:08 +1000
commitf92ba92adfce0e1975feb54ab0e1165b7c2a7bea (patch)
treec7e9f4407ec51068c5259d1be3d1e61a3ae308e6
parent85cecd981191f9c3dab0fb13310d91eff643d423 (diff)
Revert "dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents"
This call was supposed to have no functional changes but in some cases DeliverDeviceEvents() was called with a uninitialised win variable. Revert, safer than trying to sort this out otherwise. This reverts commit 6eff14a789341d366b3013c5aa020e959c954651. Reported-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r--dix/events.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/dix/events.c b/dix/events.c
index 04d7fb59b..3c7d5d0b9 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4266,7 +4266,6 @@ 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
@@ -4283,16 +4282,15 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
else
focus = PointerRootWin;
if (focus == PointerRootWin)
- {
- win = pSprite->win;
- focus = NullWindow;
- } else if (focus && (focus == pSprite->win ||
- IsParent(focus, pSprite->win)))
- win = pSprite->win;
+ 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);
else if (focus)
- win = focus;
-
- deliveries = DeliverDeviceEvents(win, event, grab, focus, thisDev);
+ deliveries = DeliverDeviceEvents(focus, event, grab, focus,
+ thisDev);
}
if (!deliveries)
{