diff options
author | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-08-03 10:12:25 +0000 |
---|---|---|
committer | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-08-03 10:12:25 +0000 |
commit | 9c1d52a69db841ac85ef97d7223361b83a66ae29 (patch) | |
tree | c90e2453a9e8f16b31f1e441c8242150a2378fc5 /hw/xwin/winclipboardthread.c | |
parent | defcfe3c7ee3e39ef02da08b7227b758dbede325 (diff) |
Merge from CYGWIN branch
2004-08-02 Kensuke Matsuzaki
Fix the bug that we can't copy & paste multi-byte string to Unicode-base
Windows application. Rename fUnicodeSupport to fUseUnicode, because it
don't mean wheather Windows support Unicode or not.
Diffstat (limited to 'hw/xwin/winclipboardthread.c')
-rw-r--r-- | hw/xwin/winclipboardthread.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c index 4987c99dd..0996b43f5 100644 --- a/hw/xwin/winclipboardthread.c +++ b/hw/xwin/winclipboardthread.c @@ -61,6 +61,7 @@ extern Window g_iClipboardWindow; static jmp_buf g_jmpEntry; Bool g_fUnicodeSupport = FALSE; +Bool g_fUseUnicode = FALSE; /* @@ -91,16 +92,19 @@ winClipboardProc (void *pvNotUsed) Display *pDisplay = NULL; Window iWindow = None; int iRetries; - Bool fUnicodeSupport; + Bool fUseUnicode; char szDisplay[512]; ErrorF ("winClipboardProc - Hello\n"); /* Do we have Unicode support? */ - fUnicodeSupport = g_fUnicodeClipboard && winClipboardDetectUnicodeSupport (); + g_fUnicodeSupport = winClipboardDetectUnicodeSupport (); + + /* Do we use Unicode clipboard? */ + fUseUnicode = g_fUnicodeClipboard && g_fUnicodeSupport; /* Save the Unicode support flag in a global */ - g_fUnicodeSupport = fUnicodeSupport; + g_fUseUnicode = fUseUnicode; /* Allow multiple threads to access Xlib */ if (XInitThreads () == 0) @@ -224,9 +228,6 @@ winClipboardProc (void *pvNotUsed) atomClipboard = XInternAtom (pDisplay, "CLIPBOARD", False); atomClipboardManager = XInternAtom (pDisplay, "CLIPBOARD_MANAGER", False); - /* FIXME: Save some values as globals for the window proc */ - g_fUnicodeSupport = fUnicodeSupport; - /* Create a messaging window */ iWindow = XCreateSimpleWindow (pDisplay, DefaultRootWindow (pDisplay), @@ -296,7 +297,7 @@ winClipboardProc (void *pvNotUsed) winClipboardFlushXEvents (hwnd, iWindow, pDisplay, - fUnicodeSupport); + fUseUnicode); /* Pre-flush Windows messages */ if (!winClipboardFlushWindowsMessageQueue (hwnd)) @@ -344,7 +345,7 @@ winClipboardProc (void *pvNotUsed) iReturn = winClipboardFlushXEvents (hwnd, iWindow, pDisplay, - fUnicodeSupport); + fUseUnicode); if (WIN_XEVENTS_SHUTDOWN == iReturn) { ErrorF ("winClipboardProc - winClipboardFlushXEvents " |