summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-22 08:11:35 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-09-22 08:11:35 +0000
commit451557e0abf842891ec42fbff3c03d20e111b898 (patch)
tree077a7455ee4531c177b64676aeada8833f8cde21
parent4fc027d116c08bcee9af2a58df3359e96aef35d4 (diff)
2004-09-22 Kensuke Matsuzaki
Fix clipboard bug with unicode applications.
-rw-r--r--hw/xwin/ChangeLog7
-rw-r--r--hw/xwin/winclipboardthread.c8
-rw-r--r--hw/xwin/winclipboardwndproc.c8
-rw-r--r--hw/xwin/winclipboardxevents.c4
4 files changed, 19 insertions, 8 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog
index 734aa29a1..67dfa8bf7 100644
--- a/hw/xwin/ChangeLog
+++ b/hw/xwin/ChangeLog
@@ -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):
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c
index 0996b43f5..4778d2a3b 100644
--- a/hw/xwin/winclipboardthread.c
+++ b/hw/xwin/winclipboardthread.c
@@ -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;
}
diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c
index 722141924..cfc97a51b 100644
--- a/hw/xwin/winclipboardwndproc.c
+++ b/hw/xwin/winclipboardwndproc.c
@@ -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 */
diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c
index 3d4444168..6a6d8ad2e 100644
--- a/hw/xwin/winclipboardxevents.c
+++ b/hw/xwin/winclipboardxevents.c
@@ -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)