[xorg-commit-diffs] xc/programs/Xserver/dix dispatch.c, 1.1.4.6.2.1, 1.1.4.6.2.2

Stuart Kreitman xorg-commit at pdx.freedesktop.org
Tue Mar 30 13:10:42 PST 2004


Committed by: stukreit

Update of /cvs/xorg/xc/programs/Xserver/dix
In directory pdx:/tmp/cvs-serv24743

Modified Files:
      Tag: DAMAGE-XFIXES
	dispatch.c 
Log Message:
Needs selection callback code for xfixes (from modular tree)
Modified Files:
 Tag: DAMAGE-XFIXES
	dispatch.c 


Index: dispatch.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/dix/dispatch.c,v
retrieving revision 1.1.4.6.2.1
retrieving revision 1.1.4.6.2.2
diff -u -d -r1.1.4.6.2.1 -r1.1.4.6.2.2
--- a/dispatch.c	30 Mar 2004 16:44:09 -0000	1.1.4.6.2.1
+++ b/dispatch.c	30 Mar 2004 21:10:39 -0000	1.1.4.6.2.2
@@ -131,6 +131,7 @@
 
 Selection *CurrentSelections;
 int NumCurrentSelections;
+CallbackListPtr SelectionCallback = NULL;
 
 static ClientPtr grabClient;
 #define GrabNone 0
@@ -462,6 +463,9 @@
 					  client->errorValue, result);
 		    break;
 	        }
+#ifdef DAMAGEEXT
+		FlushIfCriticalOutputPending ();
+#endif
 	    }
 	    FlushAllOutput();
 #ifdef SMART_SCHEDULE
@@ -1040,6 +1044,14 @@
 	CurrentSelections[i].window = stuff->window;
 	CurrentSelections[i].pWin = pWin;
 	CurrentSelections[i].client = (pWin ? client : NullClient);
+	if (SelectionCallback)
+	{
+	    SelectionInfoRec	info;
+
+	    info.selection = &CurrentSelections[i];
+	    info.kind= SelectionSetOwner;
+	    CallCallbacks(&SelectionCallback, &info);
+	}
 	return (client->noClientException);
     }
     else 
@@ -3720,7 +3732,7 @@
     client->lastGC = (GCPtr) NULL;
     client->lastGCID = INVALID;
     client->numSaved = 0;
-    client->saveSet = (pointer *)NULL;
+    client->saveSet = (SaveSetElt *)NULL;
     client->noClientException = Success;
 #ifdef DEBUG
     client->requestLogIndex = 0;
@@ -4053,6 +4065,14 @@
     for (i = 0; i< NumCurrentSelections; i++)
         if (CurrentSelections[i].pWin == pWin)
         {
+	    if (SelectionCallback)
+	    {
+		SelectionInfoRec    info;
+
+		info.selection = &CurrentSelections[i];
+		info.kind = SelectionWindowDestroy;
+		CallCallbacks(&SelectionCallback, &info);
+	    }
             CurrentSelections[i].pWin = (WindowPtr)NULL;
             CurrentSelections[i].window = None;
 	    CurrentSelections[i].client = NullClient;
@@ -4068,6 +4088,14 @@
     for (i = 0; i< NumCurrentSelections; i++)
         if (CurrentSelections[i].client == client)
         {
+	    if (SelectionCallback)
+	    {
+		SelectionInfoRec    info;
+
+		info.selection = &CurrentSelections[i];
+		info.kind = SelectionClientClose;
+		CallCallbacks(&SelectionCallback, &info);
+	    }
             CurrentSelections[i].pWin = (WindowPtr)NULL;
             CurrentSelections[i].window = None;
 	    CurrentSelections[i].client = NullClient;




More information about the xorg-commit-diffs mailing list