* Fri Mar 19 2010 Peter Hutterer <peter.hutterer@redhat.com> 1.7.99.902-2.20100319

- xserver-1.7.4-owner-events.patch: if owner-events is true for passive
  grabs, add the window mask (#543647)
This commit is contained in:
Peter Hutterer 2010-03-19 03:51:52 +00:00
parent 7248937a5d
commit 85713343ea
2 changed files with 92 additions and 1 deletions

View File

@ -19,7 +19,7 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.7.99.902
Release: 1.%{gitdate}%{dist}
Release: 2.%{gitdate}%{dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@ -86,6 +86,9 @@ Patch6052: xserver-1.8-udev-warning.patch
# fallback to vesa when module is missing seems broken
Patch6053: xserver-1.8-disable-vboxvideo.patch
# 543647
Patch6054: xserver-1.7.4-owner-events.patch
%define moduledir %{_libdir}/xorg/modules
%define drimoduledir %{_libdir}/dri
%define sdkdir %{_includedir}/xorg
@ -522,6 +525,10 @@ rm -rf $RPM_BUILD_ROOT
%{xserver_source_dir}
%changelog
* Fri Mar 19 2010 Peter Hutterer <peter.hutterer@redhat.com> 1.7.99.902-2.20100319
- xserver-1.7.4-owner-events.patch: if owner-events is true for passive
grabs, add the window mask (#543647)
* Fri Mar 19 2010 Peter Hutterer <peter.hutterer@redhat.com> 1.7.99.902-1.20100319
- Update to today's git.

View File

@ -0,0 +1,84 @@
From 883ed64cd23ad286250894b42c04603da85b65b5 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 16 Dec 2009 13:43:22 +1000
Subject: [PATCH] dix: if owner-events is true for passive grabs, add the window mask (#25400)
A client requesting a GrabModeSync button grab, owner-events true, with only
the ButtonRelease mask set would never receive the press event even if the
grab window had the ButtonPress mask set.
The protocol requires that if owner-events is true, then the delivery mask
is the combination of the grab mask + the window event mask.
X.Org Bug 25400 <http://bugs.freedesktop.org/show_bug.cgi?id=25400>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Jim Ramsay <i.am@jimramsay.com>
---
dix/events.c | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/dix/events.c b/dix/events.c
index 85c8f9a..b854d98 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3580,6 +3580,8 @@ CheckPassiveGrabsOnWindow(
xE = &core;
count = 1;
mask = grab->eventMask;
+ if (grab->ownerEvents)
+ mask |= pWin->eventMask;
} else if (match & XI2_MATCH)
{
rc = EventToXI2((InternalEvent*)event, &xE);
@@ -3601,6 +3603,24 @@ CheckPassiveGrabsOnWindow(
mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
else if (event->type == XI_Enter || event->type == XI_FocusIn)
mask = grab->xi2mask[device->id][event->type/8];
+
+ if (grab->ownerEvents && wOtherInputMasks(grab->window))
+ {
+ InputClientsPtr icp =
+ wOtherInputMasks(grab->window)->inputClients;
+
+ while(icp)
+ {
+ if (rClient(icp) == rClient(grab))
+ {
+ int evtype = (xE) ? ((xGenericEvent*)xE)->evtype : event->type;
+ mask |= icp->xi2mask[device->id][evtype/8];
+ break;
+ }
+
+ icp = icp->next;
+ }
+ }
} else
{
rc = EventToXI((InternalEvent*)event, &xE, &count);
@@ -3612,6 +3632,22 @@ CheckPassiveGrabsOnWindow(
continue;
}
mask = grab->eventMask;
+ if (grab->ownerEvents && wOtherInputMasks(grab->window))
+ {
+ InputClientsPtr icp =
+ wOtherInputMasks(grab->window)->inputClients;
+
+ while(icp)
+ {
+ if (rClient(icp) == rClient(grab))
+ {
+ mask |= icp->mask[device->id];
+ break;
+ }
+
+ icp = icp->next;
+ }
+ }
}
(*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
--
1.6.6