mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-06 23:40:13 +01:00
Additional fix for Unicode clipboard support.
This commit is contained in:
parent
4cc6355ace
commit
67eab4010c
4 changed files with 15 additions and 12 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue