Additional fix for Unicode clipboard support.

This commit is contained in:
Harold L Hunt II 2004-01-08 07:14:48 +00:00
parent 4cc6355ace
commit 67eab4010c
4 changed files with 15 additions and 12 deletions

View file

@ -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 @@ winClipboardWindowProc (HWND hwnd, UINT message,
* winclipboardxevents.c
*/
Bool
int
winClipboardFlushXEvents (HWND hwnd,
int iWindow,
Display *pDisplay,

View file

@ -350,11 +350,11 @@ winClipboardProc (void *pArg)
/* 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");

View file

@ -262,10 +262,11 @@ winClipboardWindowProc (HWND hwnd, UINT message,
}
/* 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

View file

@ -36,7 +36,7 @@
* Process any pending X events
*/
Bool
int
winClipboardFlushXEvents (HWND hwnd,
int iWindow,
Display *pDisplay,
@ -50,7 +50,6 @@ winClipboardFlushXEvents (HWND hwnd,
char *pszGlobalData = NULL;
int iReturn;
HGLOBAL hGlobal;
Bool fReturn = TRUE;
XICCEncodingStyle xiccesStyle;
int iConvertDataLen = 0;
char *pszConvertData = NULL;
@ -400,7 +399,7 @@ winClipboardFlushXEvents (HWND hwnd,
/* Process the ConvertSelection event */
XFlush (pDisplay);
break;
return WIN_XEVENTS_CONVERT;
}
else if (event.xselection.target == atomCompoundText)
{
@ -423,7 +422,7 @@ winClipboardFlushXEvents (HWND hwnd,
/* Process the ConvertSelection event */
XFlush (pDisplay);
break;
return WIN_XEVENTS_CONVERT;
}
else
{
@ -644,5 +643,5 @@ winClipboardFlushXEvents (HWND hwnd,
}
}
return fReturn;
return WIN_XEVENTS_SUCCESS;
}