Index: xorg-server/trunk/PKGBUILD =================================================================== --- xorg-server/trunk/PKGBUILD (revision 71672) +++ xorg-server/trunk/PKGBUILD (working copy) @@ -21,16 +21,22 @@ xserver-1.7.1-libcrypto.patch xserver-1.7.1-gamma-kdm-fix.patch xvfb-run - xvfb-run.1) + xvfb-run.1 + revert-351d11fd.patch) md5sums=('d436ce2f2239c196ee163c7c047c1dd2' '1a336eb22e27cbf443ec5a2ecddfa93c' '957d429cad03ac87281b7e40d963497c' '8eae23916552e609c36ecae1827c2e9d' '52fd3effd80d7bc6c1660d4ecf23d31c' - '376c70308715cd2643f7bff936d9934b') + '376c70308715cd2643f7bff936d9934b' + '228fde17e31440bea7295bbcbf9edf9e') build() { cd "${srcdir}/${pkgname}-${pkgver}" + + # Temporaly revert this, avoid break fluxbox + patch -Rp1 -i "${srcdir}/revert-351d11fd.patch" || return 1 + # Get rid of the ugly pattern patch -Np3 -i "${srcdir}/xorg-redhat-die-ugly-pattern-die-die-die.patch" || return 1 Index: xorg-server/trunk/revert-351d11fd.patch =================================================================== --- xorg-server/trunk/revert-351d11fd.patch (revision 0) +++ xorg-server/trunk/revert-351d11fd.patch (revision 0) @@ -0,0 +1,127 @@ +From 351d11fd466fae731df860a6ff4cf50ad565f43f Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 25 Feb 2010 02:49:21 +0000 +Subject: dix: Use DeliverGrabbedEvent for implicit passive grabs (#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. + +DeliverGrabbedEvents does this already for us, checking first the delivery +based on owner_events and then based on the grab mask. AFAICT, the device +cannot enter the states FREEZE_BOTH_NEXT_EVENT or FREEZE_NEXT_EVENT that +would be handled by DGE in any possible path here. + +Bonus point - CheckPassiveGrabsOnWindows suddenly becomes a lot lesss +complicated. + +X.Org Bug 25400 + +Signed-off-by: Peter Hutterer +Reviewed-by: Keith Packard +Signed-off-by: Keith Packard +(cherry picked from commit cf72b5437d2d620521279077a29c5df6d0fbb576) + +Signed-off-by: Peter Hutterer +--- +diff --git a/dix/events.c b/dix/events.c +index 02079be..c6aa4ab 100644 +--- a/dix/events.c ++++ b/dix/events.c +@@ -3462,7 +3462,6 @@ CheckPassiveGrabsOnWindow( + { + DeviceIntPtr gdev; + XkbSrvInfoPtr xkbi = NULL; +- Mask mask = 0; + + gdev= grab->modifierDevice; + if (grab->grabtype == GRABTYPE_CORE) +@@ -3515,10 +3514,6 @@ 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; +@@ -3565,62 +3560,8 @@ 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); +- +- if (xE) +- { +- FixUpEventFromWindow(device, xE, grab->window, None, TRUE); +- +- TryClientEvents(rClient(grab), device, xE, count, mask, +- GetEventFilter(device, xE), grab); +- } ++ DeliverGrabbedEvent((InternalEvent*)event, device, FALSE); + + if (grabinfo->sync.state == FROZEN_NO_EVENT) + { +@@ -3630,8 +3571,6 @@ CheckPassiveGrabsOnWindow( + grabinfo->sync.state = FROZEN_WITH_EVENT; + } + +- if (match & (XI_MATCH | XI2_MATCH)) +- xfree(xE); /* on core match xE == &core */ + return TRUE; + } + } +-- +cgit v0.8.3-6-g21f6