mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-01 11:27:58 +02:00
2004-09-22 Kensuke Matsuzaki
Fix clipboard bug with unicode applications.
This commit is contained in:
parent
4fc027d116
commit
451557e0ab
4 changed files with 19 additions and 8 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2004-09-22 Kensuke Matsuzaki
|
||||
|
||||
* winclipboardthread.c (winClipboardErrorHandler):
|
||||
* winclipboardwndproc.c (winClipboardWindowProc):
|
||||
* winclipboardxevents.c (winClipboardFlushXEvents):
|
||||
Fix clipboard bug with unicode applications.
|
||||
|
||||
2004-09-16 Alexander Gottwald <ago at freedesktop dot org>
|
||||
|
||||
* wincreatewnd.c (winCreateBoundingWindowWindowed):
|
||||
|
|
|
|||
|
|
@ -429,8 +429,12 @@ winClipboardErrorHandler (Display *pDisplay, XErrorEvent *pErr)
|
|||
pErr->error_code,
|
||||
pszErrorMsg,
|
||||
sizeof (pszErrorMsg));
|
||||
ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n", pszErrorMsg);
|
||||
|
||||
ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n"
|
||||
"\tSerial: %d, Request Code: %d, Minor Code: %d\n",
|
||||
pszErrorMsg,
|
||||
pErr->serial,
|
||||
pErr->request_code,
|
||||
pErr->minor_code);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
*/
|
||||
|
||||
extern Bool g_fUseUnicode;
|
||||
extern Bool g_fUnicodeSupport;
|
||||
extern void *g_pClipboardDisplay;
|
||||
extern Window g_iClipboardWindow;
|
||||
extern Atom g_atomLastOwnedSelection;
|
||||
|
|
@ -445,7 +446,7 @@ winClipboardWindowProc (HWND hwnd, UINT message,
|
|||
if (message == WM_RENDERALLFORMATS)
|
||||
fConvertToUnicode = FALSE;
|
||||
else
|
||||
fConvertToUnicode = g_fUseUnicode && (CF_UNICODETEXT == wParam);
|
||||
fConvertToUnicode = g_fUnicodeSupport && (CF_UNICODETEXT == wParam);
|
||||
|
||||
/* Request the selection contents */
|
||||
iReturn = XConvertSelection (pDisplay,
|
||||
|
|
@ -521,10 +522,9 @@ winClipboardWindowProc (HWND hwnd, UINT message,
|
|||
if (WIN_XEVENTS_NOTIFY != iReturn)
|
||||
{
|
||||
/* Paste no data, to satisfy required call to SetClipboardData */
|
||||
if (fConvertToUnicode)
|
||||
if (g_fUnicodeSupport)
|
||||
SetClipboardData (CF_UNICODETEXT, NULL);
|
||||
else
|
||||
SetClipboardData (CF_TEXT, NULL);
|
||||
SetClipboardData (CF_TEXT, NULL);
|
||||
}
|
||||
|
||||
/* Special handling for WM_RENDERALLFORMATS */
|
||||
|
|
|
|||
|
|
@ -135,8 +135,8 @@ winClipboardFlushXEvents (HWND hwnd,
|
|||
iReturn = XChangeProperty (pDisplay,
|
||||
event.xselectionrequest.requestor,
|
||||
event.xselectionrequest.property,
|
||||
event.xselectionrequest.target,
|
||||
sizeof (atomTargetArr[0]),
|
||||
XA_ATOM,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char *) atomTargetArr,
|
||||
(sizeof (atomTargetArr)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue