2004-09-22 Kensuke Matsuzaki

Fix clipboard bug with unicode applications.
This commit is contained in:
Alexander Gottwald 2004-09-22 08:11:35 +00:00
parent 4fc027d116
commit 451557e0ab
4 changed files with 19 additions and 8 deletions

View file

@ -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):

View file

@ -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;
}

View file

@ -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 */

View file

@ -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)