xserver: Branch 'master' - 4 commits

Daniel Stone daniels at kemper.freedesktop.org
Wed Dec 5 11:39:34 PST 2007


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

New commits:
commit 320abd7d1d906807448fa01ad3377daf707f46cc
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.

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 85dd8efac1bc0715f03c99d261b1c5d0980623e1
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.

diff --git a/os/WaitFor.c b/os/WaitFor.c
index 71ca534..e6d45e6 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -257,7 +257,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 b7f3618f3933a810778093fd47564a1e3bf3fde6
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.

diff --git a/os/connection.c b/os/connection.c
index 6012a8e..be7521f 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1057,7 +1057,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]]);
@@ -1071,9 +1073,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 d8b2cad3771a09860e7be1726f67e684cf7caeec
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.

diff --git a/os/connection.c b/os/connection.c
index 860404f..6012a8e 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1059,7 +1059,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