diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index b05a039..21cac2f 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -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 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 1.7.99.902-1.20100319 - Update to today's git. diff --git a/xserver-1.7.4-owner-events.patch b/xserver-1.7.4-owner-events.patch new file mode 100644 index 0000000..f77a8b0 --- /dev/null +++ b/xserver-1.7.4-owner-events.patch @@ -0,0 +1,84 @@ +From 883ed64cd23ad286250894b42c04603da85b65b5 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +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 + +Signed-off-by: Peter Hutterer +Tested-by: Jim Ramsay +--- + 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 +