[Xorg-commit] xc/programs/Xserver/hw/xwin winclipboard.h,1.1.4.1.2.2,1.1.4.1.2.3 winclipboardthread.c,1.1.4.1.2.2,1.1.4.1.2.3 winclipboardwndproc.c,1.1.4.1.2.1,1.1.4.1.2.2 winclipboardxevents.c,1.1.4.1.2.3,1.1.4.1.2.4

Harold L Hunt II xorg-commit at pdx.freedesktop.org
Thu Jan 8 09:14:50 EET 2004


Committed by: harold

Update of /cvs/xorg/xc/programs/Xserver/hw/xwin
In directory pdx:/tmp/cvs-serv19297

Modified Files:
      Tag: CYGWIN
	winclipboard.h winclipboardthread.c winclipboardwndproc.c 
	winclipboardxevents.c 
Log Message:
Additional fix for Unicode clipboard support.

Index: winclipboard.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboard.h,v
retrieving revision 1.1.4.1.2.2
retrieving revision 1.1.4.1.2.3
diff -u -d -r1.1.4.1.2.2 -r1.1.4.1.2.3
--- winclipboard.h	8 Jan 2004 05:10:32 -0000	1.1.4.1.2.2
+++ winclipboard.h	8 Jan 2004 07:14:48 -0000	1.1.4.1.2.3
@@ -70,6 +70,9 @@
 #define WIN_JMP_OKAY				0
 #define WIN_JMP_ERROR_IO			2
 #define WIN_LOCAL_PROPERTY			"CYGX_CUT_BUFFER"
+#define WIN_XEVENTS_SUCCESS			0
+#define WIN_XEVENTS_SHUTDOWN			1
+#define WIN_XEVENTS_CONVERT			2
 
 
 /*
@@ -174,7 +177,7 @@
  * winclipboardxevents.c
  */
 
-Bool
+int
 winClipboardFlushXEvents (HWND hwnd,
 			  int iWindow,
 			  Display *pDisplay,

Index: winclipboardthread.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardthread.c,v
retrieving revision 1.1.4.1.2.2
retrieving revision 1.1.4.1.2.3
diff -u -d -r1.1.4.1.2.2 -r1.1.4.1.2.3
--- winclipboardthread.c	8 Jan 2004 05:10:32 -0000	1.1.4.1.2.2
+++ winclipboardthread.c	8 Jan 2004 07:14:48 -0000	1.1.4.1.2.3
@@ -350,11 +350,11 @@
 
 	  /* Process X events */
 	  /* Exit when we see that server is shutting down */
-	  fReturn = winClipboardFlushXEvents (hwnd,
+	  iReturn = winClipboardFlushXEvents (hwnd,
 					      iWindow,
 					      pDisplay,
 					      fUnicodeSupport);
-	  if (!fReturn)
+	  if (WIN_XEVENTS_SHUTDOWN == iReturn)
 	    {
 	      ErrorF ("winClipboardProc - winClipboardFlushXEvents "
 		      "trapped shutdown event, exiting main loop.\n");

Index: winclipboardwndproc.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardwndproc.c,v
retrieving revision 1.1.4.1.2.1
retrieving revision 1.1.4.1.2.2
diff -u -d -r1.1.4.1.2.1 -r1.1.4.1.2.2
--- winclipboardwndproc.c	8 Jan 2004 05:10:32 -0000	1.1.4.1.2.1
+++ winclipboardwndproc.c	8 Jan 2004 07:14:48 -0000	1.1.4.1.2.2
@@ -262,10 +262,11 @@
 	  }
 	
 	/* Process the SelectionNotify event */
-	if (!winClipboardFlushXEvents (hwnd,
-				       iWindow,
-				       pDisplay,
-				       g_fUnicodeSupport))
+	iReturn = winClipboardFlushXEvents (hwnd,
+					    iWindow,
+					    pDisplay,
+					    g_fUnicodeSupport);
+	if (WIN_XEVENTS_CONVERT == iReturn)
 	  {
 	    /*
 	     * The selection was offered for conversion first, so we have

Index: winclipboardxevents.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardxevents.c,v
retrieving revision 1.1.4.1.2.3
retrieving revision 1.1.4.1.2.4
diff -u -d -r1.1.4.1.2.3 -r1.1.4.1.2.4
--- winclipboardxevents.c	8 Jan 2004 06:37:44 -0000	1.1.4.1.2.3
+++ winclipboardxevents.c	8 Jan 2004 07:14:48 -0000	1.1.4.1.2.4
@@ -36,7 +36,7 @@
  * Process any pending X events
  */
 
-Bool
+int
 winClipboardFlushXEvents (HWND hwnd,
 			  int iWindow,
 			  Display *pDisplay,
@@ -50,7 +50,6 @@
   char			*pszGlobalData = NULL;
   int			iReturn;
   HGLOBAL		hGlobal;
-  Bool			fReturn = TRUE;
   XICCEncodingStyle	xiccesStyle;
   int			iConvertDataLen = 0;
   char			*pszConvertData = NULL;
@@ -400,7 +399,7 @@
 
 		  /* Process the ConvertSelection event */
 		  XFlush (pDisplay);
-		  break;
+		  return WIN_XEVENTS_CONVERT;
 		}
 	      else if (event.xselection.target == atomCompoundText)
 		{
@@ -423,7 +422,7 @@
 
 		  /* Process the ConvertSelection event */
 		  XFlush (pDisplay);
-		  break;
+		  return WIN_XEVENTS_CONVERT;
 		}
 	      else
 		{
@@ -644,5 +643,5 @@
 	}
     }
 
-  return fReturn;
+  return WIN_XEVENTS_SUCCESS;
 }





More information about the xorg-commit mailing list