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

Daniel Stone daniels at kemper.freedesktop.org
Thu Dec 6 06:54:43 PST 2007


 hw/kdrive/ephyr/ephyrinit.c     |    2 ++
 hw/xfree86/dixmods/xkbKillSrv.c |    4 +++-
 os/WaitFor.c                    |    2 +-
 os/connection.c                 |   16 +++++++++++-----
 xkb/ddxKillSrv.c                |    4 +++-
 xkb/xkbActions.c                |   19 +++++++++++++++++--
 6 files changed, 37 insertions(+), 10 deletions(-)

New commits:
commit 9f4689173ef9db080592497dc2212ae79b8d6e02
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Thu Dec 6 00:46:32 2007 +0000

    KDrive: Xephyr: Fix non-GLX builds
    
    Only set noGlxExtension if we're actually building GLX.

diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index c33892c..e4ff975 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -47,7 +47,9 @@ InitCard (char *name)
 void
 InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
 {
+#ifdef GLXEXT
   noGlxExtension=TRUE;
+#endif
   KdInitOutput (pScreenInfo, argc, argv);
 }
 
commit d37351308b255d5f9bff3438b6767c62974902da
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Wed Dec 5 19:37:48 2007 +0000

    XKB: Actions: Don't run certain actions on the core keyboard
    
    Don't run VT switches, terminations, or anything, on the core keyboard: only
    run actions which affect the keyboard state.  If we get an action such as VT
    switch, just swallow the event.
    (cherry picked from commit 320abd7d1d906807448fa01ad3377daf707f46cc)

diff --git a/hw/xfree86/dixmods/xkbKillSrv.c b/hw/xfree86/dixmods/xkbKillSrv.c
index b3399db..9074fd3 100644
--- a/hw/xfree86/dixmods/xkbKillSrv.c
+++ b/hw/xfree86/dixmods/xkbKillSrv.c
@@ -48,6 +48,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 int
 XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
 {
-    xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
+    if (dev != inputInfo.keyboard)
+        xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
+
     return 0;
 }
diff --git a/xkb/ddxKillSrv.c b/xkb/ddxKillSrv.c
index a573ecb..3b5fd53 100644
--- a/xkb/ddxKillSrv.c
+++ b/xkb/ddxKillSrv.c
@@ -41,6 +41,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 int
 XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
 {
-    GiveUp(1);
+    if (dev != inputInfo.keyboard)
+        GiveUp(1);
+
     return 0;
 }
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 8ddbdba..6edac29 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -561,6 +561,9 @@ _XkbFilterPointerMove(	XkbSrvInfoPtr	xkbi,
 int	x,y;
 Bool	accel;
 
+    if (xkbi->device == inputInfo.keyboard)
+        return 0;
+
     if (filter->keycode==0) {		/* initial press */
 	filter->keycode = keycode;
 	filter->active = 1;
@@ -601,6 +604,9 @@ _XkbFilterPointerBtn(	XkbSrvInfoPtr	xkbi,
 			unsigned	keycode,
 			XkbAction *	pAction)
 {
+    if (xkbi->device == inputInfo.keyboard)
+        return 0;
+
     if (filter->keycode==0) {		/* initial press */
 	int	button= pAction->btn.button;
 
@@ -980,8 +986,11 @@ _XkbFilterSwitchScreen(	XkbSrvInfoPtr	xkbi,
 			unsigned	keycode,
 			XkbAction *	pAction)
 {
+    DeviceIntPtr dev = xkbi->device;
+    if (dev == inputInfo.keyboard)
+        return 0;
+
     if (filter->keycode==0) {		/* initial press */
-        DeviceIntPtr	dev = xkbi->device;
 	filter->keycode = keycode;
 	filter->active = 1;
 	filter->filterOthers = 0;
@@ -1003,8 +1012,11 @@ _XkbFilterXF86Private(	XkbSrvInfoPtr	xkbi,
 			unsigned	keycode,
 			XkbAction *	pAction)
 {
+    DeviceIntPtr dev = xkbi->device;
+    if (dev == inputInfo.keyboard)
+        return 0;
+
     if (filter->keycode==0) {		/* initial press */
-        DeviceIntPtr	dev = xkbi->device;
 	filter->keycode = keycode;
 	filter->active = 1;
 	filter->filterOthers = 0;
@@ -1029,6 +1041,9 @@ _XkbFilterDeviceBtn(	XkbSrvInfoPtr	xkbi,
 DeviceIntPtr	dev;
 int		button;
 
+    if (dev == inputInfo.keyboard)
+        return 0;
+
     if (filter->keycode==0) {		/* initial press */
 	dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL);
 	if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice()))
commit 27da1367c9ea143946b8b8d3dbd0f9d44c4a9039
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Wed Dec 5 19:36:59 2007 +0000

    WaitForSomething: Ignore EAGAIN
    
    If select ever returns EAGAIN, don't bother complaining.
    (cherry picked from commit 85dd8efac1bc0715f03c99d261b1c5d0980623e1)

diff --git a/os/WaitFor.c b/os/WaitFor.c
index ec1592c..65f53c5 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -262,7 +262,7 @@ WaitForSomething(int *pClientsReady)
 		    FatalError("WaitForSomething(): select: errno=%d\n",
 			selecterr);
             }
-		else if (selecterr != EINTR)
+		else if (selecterr != EINTR && selecterr != EAGAIN)
 		{
 		    ErrorF("WaitForSomething(): select: errno=%d\n",
 			selecterr);
commit 259f86b13b453f3503afd3d523de32b43996d334
Author: Rich Coe <Richard.Coe at med.ge.com>
Date:   Wed Dec 5 19:36:37 2007 +0000

    OS: Connection: Keep trying select while it gets interrupted (bug #9240)
    
    If we got interrupted (EINTR or EAGAIN) during select, just try again, rather
    than shutting clients down on either of these errors.
    (cherry picked from commit b7f3618f3933a810778093fd47564a1e3bf3fde6)

diff --git a/os/connection.c b/os/connection.c
index 135dd2c..b944593 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1006,7 +1006,9 @@ CheckConnections(void)
 	    curclient = curoff + (i * (sizeof(fd_mask)*8));
             FD_ZERO(&tmask);
             FD_SET(curclient, &tmask);
-            r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
+            do {
+                r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
+            } while (r < 0 && (errno == EINTR || errno == EAGAIN));
             if (r < 0)
                 if (ConnectionTranslation[curclient] > 0)
                     CloseDownClient(clients[ConnectionTranslation[curclient]]);
@@ -1020,9 +1022,12 @@ CheckConnections(void)
 	curclient = XFD_FD(&savedAllClients, i);
 	FD_ZERO(&tmask);
 	FD_SET(curclient, &tmask);
-	r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
-	if (r < 0 && GetConnectionTranslation(curclient) > 0)
-	    CloseDownClient(clients[GetConnectionTranslation(curclient)]);
+        do {
+            r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
+        } while (r < 0 && (errno == EINTR || errno == EAGAIN));
+	if (r < 0)
+            if (GetConnectionTranslation(curclient) > 0)
+                CloseDownClient(clients[GetConnectionTranslation(curclient)]);
     }	
 #endif
 }
commit 90649e6a39dc6caad8313b25ef869a089f81aba7
Author: Rich Coe <Richard.Coe at med.ge.com>
Date:   Wed Dec 5 19:31:07 2007 +0000

    OS: Connection: Don't shut down disappeared clients (bug #7876)
    
    If a client disappears in the middle of CheckConnections (presumably
    because its appgroup leader disappears), then don't attempt to shut it down
    a second time, when it's already vanished.
    (cherry picked from commit d8b2cad3771a09860e7be1726f67e684cf7caeec)

diff --git a/os/connection.c b/os/connection.c
index d975f87..135dd2c 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1008,7 +1008,8 @@ CheckConnections(void)
             FD_SET(curclient, &tmask);
             r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
             if (r < 0)
-		CloseDownClient(clients[ConnectionTranslation[curclient]]);
+                if (ConnectionTranslation[curclient] > 0)
+                    CloseDownClient(clients[ConnectionTranslation[curclient]]);
 	    mask &= ~((fd_mask)1 << curoff);
 	}
     }	


More information about the xorg-commit mailing list