[PATCH] Revert "dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents"
Peter Hutterer
peter.hutterer at who-t.net
Sat Feb 4 01:30:57 PST 2012
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 at free.fr>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/events.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/dix/events.c b/dix/events.c
index 04d7fb5..3c7d5d0 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)
{
--
1.7.7.5
More information about the xorg-devel
mailing list