From 2356ef31e985421b3328fcb138ec287f47f36c55 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mar 09 2010 02:29:04 +0000 Subject: * Tue Mar 09 2010 Peter Hutterer 1.7.5.901-4 - cvs add the patches... --- diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 8429ab2..de4282f 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.5.901 -Release: 3%{dist} +Release: 4%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -526,6 +526,9 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Tue Mar 09 2010 Peter Hutterer 1.7.5.901-4 +- cvs add the patches... + * Tue Mar 09 2010 Peter Hutterer 1.7.5.901-3 - Revert to previous version of xserver-1.7.5-owner-events.patch. The one in git breaks fluxbox. 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 + diff --git a/xserver-1.7.5.901-revert-owner-events.patch b/xserver-1.7.5.901-revert-owner-events.patch new file mode 100644 index 0000000..4ecd1aa --- /dev/null +++ b/xserver-1.7.5.901-revert-owner-events.patch @@ -0,0 +1,116 @@ +From 2086e4920a16248aa150114236dfb0637c20559a Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 9 Mar 2010 09:42:42 +1000 +Subject: [PATCH] Revert "dix: Use DeliverGrabbedEvent for implicit passive grabs (#25400)" + +Reported-by: Florian Mickerl +"this regresses my desktop. fluxbox is not able to move the windows around +anymore. also popup of context-menue does not work. (well sometimes it does, +but then the fluxbox-keyboard-shortcuts do not work)" + +This reverts commit 351d11fd466fae731df860a6ff4cf50ad565f43f. + +Signed-off-by: Peter Hutterer +--- + dix/events.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 62 insertions(+), 1 deletions(-) + +diff --git a/dix/events.c b/dix/events.c +index c6aa4ab..02079be 100644 +--- a/dix/events.c ++++ b/dix/events.c +@@ -3462,6 +3462,7 @@ CheckPassiveGrabsOnWindow( + { + DeviceIntPtr gdev; + XkbSrvInfoPtr xkbi = NULL; ++ Mask mask = 0; + + gdev= grab->modifierDevice; + if (grab->grabtype == GRABTYPE_CORE) +@@ -3514,6 +3515,10 @@ CheckPassiveGrabsOnWindow( + (grab->confineTo->realized && + BorderSizeNotEmpty(device, grab->confineTo)))) + { ++ int rc, count = 0; ++ xEvent *xE = NULL; ++ xEvent core; ++ + event->corestate &= 0x1f00; + event->corestate |= tempGrab.modifiersDetail.exact & (~0x1f00); + grabinfo = &device->deviceGrab; +@@ -3560,8 +3565,62 @@ CheckPassiveGrabsOnWindow( + } + + ++ if (match & CORE_MATCH) ++ { ++ rc = EventToCore((InternalEvent*)event, &core); ++ if (rc != Success) ++ { ++ if (rc != BadMatch) ++ ErrorF("[dix] %s: core conversion failed in CPGFW " ++ "(%d, %d).\n", device->name, event->type, rc); ++ continue; ++ } ++ xE = &core; ++ count = 1; ++ mask = grab->eventMask; ++ } else if (match & XI2_MATCH) ++ { ++ rc = EventToXI2((InternalEvent*)event, &xE); ++ if (rc != Success) ++ { ++ if (rc != BadMatch) ++ ErrorF("[dix] %s: XI2 conversion failed in CPGFW " ++ "(%d, %d).\n", device->name, event->type, rc); ++ continue; ++ } ++ count = 1; ++ ++ /* FIXME: EventToXI2 returns NULL for enter events, so ++ * dereferencing the event is bad. Internal event types are ++ * aligned with core events, so the else clause is valid. ++ * long-term we should use internal events for enter/focus ++ * as well */ ++ if (xE) ++ 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]; ++ } else ++ { ++ rc = EventToXI((InternalEvent*)event, &xE, &count); ++ if (rc != Success) ++ { ++ if (rc != BadMatch) ++ ErrorF("[dix] %s: XI conversion failed in CPGFW " ++ "(%d, %d).\n", device->name, event->type, rc); ++ continue; ++ } ++ mask = grab->eventMask; ++ } ++ + (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE); +- DeliverGrabbedEvent((InternalEvent*)event, device, FALSE); ++ ++ if (xE) ++ { ++ FixUpEventFromWindow(device, xE, grab->window, None, TRUE); ++ ++ TryClientEvents(rClient(grab), device, xE, count, mask, ++ GetEventFilter(device, xE), grab); ++ } + + if (grabinfo->sync.state == FROZEN_NO_EVENT) + { +@@ -3571,6 +3630,8 @@ CheckPassiveGrabsOnWindow( + grabinfo->sync.state = FROZEN_WITH_EVENT; + } + ++ if (match & (XI_MATCH | XI2_MATCH)) ++ xfree(xE); /* on core match xE == &core */ + return TRUE; + } + } +-- +1.6.6.1 +