mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-02 20:08:09 +02:00
New try at Unicode clipboard fix.
This commit is contained in:
parent
cfe26c249a
commit
da04c87904
3 changed files with 14 additions and 5 deletions
|
|
@ -215,11 +215,18 @@ winClipboardWindowProc (HWND hwnd, UINT message,
|
|||
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 @@ winClipboardWindowProc (HWND hwnd, UINT message,
|
|||
iReturn = winClipboardFlushXEvents (hwnd,
|
||||
iWindow,
|
||||
pDisplay,
|
||||
g_fUnicodeSupport);
|
||||
fConvertToUnicode);
|
||||
if (WIN_XEVENTS_CONVERT == iReturn)
|
||||
{
|
||||
/*
|
||||
|
|
@ -280,7 +287,7 @@ winClipboardWindowProc (HWND hwnd, UINT message,
|
|||
winClipboardFlushXEvents (hwnd,
|
||||
iWindow,
|
||||
pDisplay,
|
||||
g_fUnicodeSupport);
|
||||
fConvertToUnicode);
|
||||
}
|
||||
|
||||
/* Special handling for WM_RENDERALLFORMATS */
|
||||
|
|
|
|||
|
|
@ -475,11 +475,12 @@ winProcSetSelectionOwner (ClientPtr client)
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -365,6 +365,7 @@ winClipboardFlushXEvents (HWND hwnd,
|
|||
XFree (pszAtomName);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Request conversion of UTF8 and CompoundText targets.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue