xserver: Branch 'server-1.7-branch' - 5 commits

Peter Hutterer whot at kemper.freedesktop.org
Thu Mar 11 22:56:37 PST 2010


 Xext/Makefile.am   |    4 ++
 Xi/exevents.c      |    2 -
 configure.ac       |    6 +--
 dix/events.c       |   91 ++++++++++++++++++++++++++++++++++++-----------------
 include/inputstr.h |   30 +++++++++++++++++
 5 files changed, 101 insertions(+), 32 deletions(-)

New commits:
commit 5a2b3f36a05d1e0fcfd1b0f85d6584478ba24eda
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Mar 12 16:53:06 2010 +1000

    xserver 1.7.5.902
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/configure.ac b/configure.ac
index 9dca987..2046157 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.7.5.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2010-03-05"
+AC_INIT([xorg-server], 1.7.5.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2010-03-12"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
commit c25b34fe61cb3fc7c3583a8ccf62c470cc8ead06
Merge: 3ae6a37... ff5fb43...
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Mar 12 16:37:28 2010 +1000

    Merge branch 'server-1.7-nominations' into server-1.7-branch

commit ff5fb43a4b38c707a1a9948ace621a62b5b2457a
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Mar 12 14:39:19 2010 +1000

    Xext: Link to external libraries when necessary.
    
    Although the DDX should be linked to the necessary libraries, we may
    also need to pull them in directly to the module to ensure the symbols
    are resolved at runtime. Should fix this bug with XSELINUX:
    
    /usr/bin/X: symbol lookup error:
    /usr/lib64/xorg/modules/extensions/libextmod.so: undefined symbol:
    is_selinux_enabled
    
    -v2: use _LIBADD instead of _LIBS; remove SELINUX_LIBS from
         XSERVER_SYS_LIBS as it should only be needed in extmod.
    
    Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
    Signed-off-by: Eamon Walsh <ewalsh at tycho.nsa.gov>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit 178da6534fe7ab4b99fb87925c04e6f963c88583)
    
    Conflicts:
    
    	configure.ac

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index ac45f95..4f05ce9 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -32,6 +32,7 @@ BUILTIN_SRCS =			\
 
 # Sources always included in libXextmodule.la & libXext.la. That's right, zero.
 MODULE_SRCS =
+MODULE_LIBS =
 
 # Optional sources included if extension enabled by configure.ac rules
 
@@ -83,6 +84,7 @@ endif
 XSELINUX_SRCS = xselinux.c xselinux.h
 if XSELINUX
 MODULE_SRCS += $(XSELINUX_SRCS)
+MODULE_LIBS += $(SELINUX_LIBS)
 endif
 
 # Security extension: multi-level security to protect clients from each other
@@ -119,11 +121,13 @@ endif
 # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la
 
 libXext_la_SOURCES =		$(BUILTIN_SRCS) $(MODULE_SRCS)
+libXext_la_LIBADD =		$(MODULE_LIBS)
 
 if XORG
 libXextbuiltin_la_SOURCES =	$(BUILTIN_SRCS)
 
 libXextmodule_la_SOURCES =	$(MODULE_SRCS)
+libXextmodule_la_LIBADD =	$(MODULE_LIBS)
 endif
 
 EXTRA_DIST = \
diff --git a/configure.ac b/configure.ac
index 08e444e..9dca987 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1326,7 +1326,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
 #
 XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}"
 XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
-XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB} ${SELINUX_LIBS}"
+XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
 AC_SUBST([XSERVER_LIBS])
 AC_SUBST([XSERVER_SYS_LIBS])
 
commit a69c7a4c539f933df3f6aa5444cdde95e4d5698a
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Thu Mar 11 14:19:04 2010 +0200

    Record: Avoid duplicates from replaying frozen events
    
    Reintroduce a check which used to be there in the old
    ProcessKeyboardEvent/ProcessPointerEvent codepath, which avoids us
    recording events subject to a grab twice: once when it's first processed
    in EnqueueEvent, and then again when it's thawed and being replayed.
    
    This required a tiny amount of code motion to expose syncEvents.
    
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit a2ea8c2f2cc53607d57d60f41c879380ea70cd02)
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index a63b65b..e680f6f 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1051,7 +1051,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
             break;
     }
 
-    if (DeviceEventCallback) {
+    if (DeviceEventCallback && !syncEvents.playingEvents) {
 	DeviceEventInfoRec eventinfo;
 	SpritePtr pSprite = device->spriteInfo->sprite;
 
diff --git a/dix/events.c b/dix/events.c
index 02079be..3c625db 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -253,33 +253,7 @@ extern BOOL EventIsKeyRepeat(xEvent *event);
  */
 InputInfo inputInfo;
 
-/**
- * syncEvents is the global structure for queued events.
- *
- * Devices can be frozen through GrabModeSync pointer grabs. If this is the
- * case, events from these devices are added to "pending" instead of being
- * processed normally. When the device is unfrozen, events in "pending" are
- * replayed and processed as if they would come from the device directly.
- */
-static struct {
-    QdEventPtr		pending, /**<  list of queued events */
-                        *pendtail; /**< last event in list */
-    /** The device to replay events for. Only set in AllowEvents(), in which
-     * case it is set to the device specified in the request. */
-    DeviceIntPtr	replayDev;	/* kludgy rock to put flag for */
-
-    /**
-     * The window the events are supposed to be replayed on.
-     * This window may be set to the grab's window (but only when
-     * Replay{Pointer|Keyboard} is given in the XAllowEvents()
-     * request. */
-    WindowPtr		replayWin;	/*   ComputeFreezes            */
-    /**
-     * Flag to indicate whether we're in the process of
-     * replaying events. Only set in ComputeFreezes(). */
-    Bool		playingEvents;
-    TimeStamp		time;
-} syncEvents;
+EventSyncInfoRec syncEvents;
 
 /**
  * The root window the given device is currently on.
diff --git a/include/inputstr.h b/include/inputstr.h
index 29ad5a8..15184d0 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -557,4 +557,34 @@ typedef struct _QdEvent {
     InternalEvent	*event;
 } QdEventRec;
 
+/**
+ * syncEvents is the global structure for queued events.
+ *
+ * Devices can be frozen through GrabModeSync pointer grabs. If this is the
+ * case, events from these devices are added to "pending" instead of being
+ * processed normally. When the device is unfrozen, events in "pending" are
+ * replayed and processed as if they would come from the device directly.
+ */
+typedef struct _EventSyncInfo {
+    QdEventPtr          pending, /**<  list of queued events */
+                        *pendtail; /**< last event in list */
+    /** The device to replay events for. Only set in AllowEvents(), in which
+     * case it is set to the device specified in the request. */
+    DeviceIntPtr        replayDev;      /* kludgy rock to put flag for */
+
+    /**
+     * The window the events are supposed to be replayed on.
+     * This window may be set to the grab's window (but only when
+     * Replay{Pointer|Keyboard} is given in the XAllowEvents()
+     * request. */
+    WindowPtr           replayWin;      /*   ComputeFreezes            */
+    /**
+     * Flag to indicate whether we're in the process of
+     * replaying events. Only set in ComputeFreezes(). */
+    Bool                playingEvents;
+    TimeStamp           time;
+} EventSyncInfoRec, *EventSyncInfoPtr;
+
+extern EventSyncInfoRec syncEvents;
+
 #endif /* INPUTSTRUCT_H */
commit 2086e4920a16248aa150114236dfb0637c20559a
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Mar 9 09:42:42 2010 +1000

    Revert "dix: Use DeliverGrabbedEvent for implicit passive grabs (#25400)"
    
    Reported-by: Florian Mickerl <florian at mickler.org>
    "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 <peter.hutterer at who-t.net>

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;
 	}
     }


More information about the xorg-commit mailing list