[Xorg-commit] xc/programs/Xserver/hw/xwin winclipboardwndproc.c,1.1.4.1.2.2,1.1.4.1.2.3 winclipboardwrappers.c,1.1.2.1,1.1.2.2 winclipboardxevents.c,1.1.4.1.2.4,1.1.4.1.2.5

Harold L Hunt II xorg-commit at pdx.freedesktop.org
Fri Jan 9 08:24:47 EET 2004


Committed by: harold

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

Modified Files:
      Tag: CYGWIN
	winclipboardwndproc.c winclipboardwrappers.c 
	winclipboardxevents.c 
Log Message:
New try at Unicode clipboard fix.

Index: winclipboardwndproc.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardwndproc.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
--- winclipboardwndproc.c	8 Jan 2004 07:14:48 -0000	1.1.4.1.2.2
+++ winclipboardwndproc.c	9 Jan 2004 06:24:25 -0000	1.1.4.1.2.3
@@ -215,11 +215,18 @@
 	int	iReturn;
 	Display *pDisplay = *(pWindowProp->ppClipboardDisplay);
 	Window	iWindow = *(pWindowProp->piClipboardWindow);
+	Bool	fConvertToUnicode;
 
 #if 0
 	ErrorF ("winClipboardWindowProc - WM_RENDER*FORMAT - Hello.\n");
 #endif
 
+	/* Flag whether to convert to Unicode or not */
+	if (message == WM_RENDERALLFORMATS)
+	  fConvertToUnicode = FALSE;
+	else
+	  fConvertToUnicode = g_fUnicodeSupport && (CF_UNICODETEXT == wParam);
+
 	/* Request the selection contents */
 	iReturn = XConvertSelection (pDisplay,
 				     *(pWindowProp->patomLastOwnedSelection),
@@ -265,7 +272,7 @@
 	iReturn = winClipboardFlushXEvents (hwnd,
 					    iWindow,
 					    pDisplay,
-					    g_fUnicodeSupport);
+					    fConvertToUnicode);
 	if (WIN_XEVENTS_CONVERT == iReturn)
 	  {
 	    /*
@@ -280,7 +287,7 @@
 	    winClipboardFlushXEvents (hwnd,
 				      iWindow,
 				      pDisplay,
-				      g_fUnicodeSupport);
+				      fConvertToUnicode);
 	  }
 
 	/* Special handling for WM_RENDERALLFORMATS */

Index: winclipboardwrappers.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/Attic/winclipboardwrappers.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- winclipboardwrappers.c	8 Jan 2004 05:10:32 -0000	1.1.2.1
+++ winclipboardwrappers.c	9 Jan 2004 06:24:25 -0000	1.1.2.2
@@ -475,11 +475,12 @@
       goto winProcSetSelectionOwner_Done;
     }
 
-  /* Setup supported clipboard formats */
+  /* Advertise Unicode if we support it */
   if (g_fUnicodeSupport)
     SetClipboardData (CF_UNICODETEXT, NULL);
-  else
-    SetClipboardData (CF_TEXT, NULL);
+
+  /* Always advertise regular text */
+  SetClipboardData (CF_TEXT, NULL);
 
   /* Save handle to last owned selection */
   pScreenPriv->atomLastOwnedSelection = stuff->selection;

Index: winclipboardxevents.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardxevents.c,v
retrieving revision 1.1.4.1.2.4
retrieving revision 1.1.4.1.2.5
diff -u -d -r1.1.4.1.2.4 -r1.1.4.1.2.5
--- winclipboardxevents.c	8 Jan 2004 07:14:48 -0000	1.1.4.1.2.4
+++ winclipboardxevents.c	9 Jan 2004 06:24:25 -0000	1.1.4.1.2.5
@@ -365,6 +365,7 @@
 	    XFree (pszAtomName);
 	  }
 
+
 	  /*
 	   * Request conversion of UTF8 and CompoundText targets.
 	   */





More information about the xorg-commit mailing list