diff options
author | Colin Harrison <colin.harrison@virgin.net> | 2009-02-03 15:51:02 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-02-12 12:06:25 +0000 |
commit | 7cb1622ce44754d9dcd6f405fb8403bd79c3e7e4 (patch) | |
tree | 29151c13a2c299caf93e2e21ce0eba7f794a525f | |
parent | b997b3849d902894dd5b38673b73a23a47edf502 (diff) |
Xming: Select events correctly in clipboard integration code
The clipboard should only select PropertyChange events and do this on
the correct window, the messaging window for the clipboard not the root
window!
Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r-- | hw/xwin/winclipboardthread.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c index 19aa7ea24..c1e8e131c 100644 --- a/hw/xwin/winclipboardthread.c +++ b/hw/xwin/winclipboardthread.c @@ -233,15 +233,6 @@ winClipboardProc (void *pvNotUsed) iMaxDescriptor = iConnectionNumber + 1; #endif - /* Select event types to watch */ - if (XSelectInput (pDisplay, - DefaultRootWindow (pDisplay), - SubstructureNotifyMask | - StructureNotifyMask | - PropertyChangeMask) == BadWindow) - ErrorF ("winClipboardProc - XSelectInput generated BadWindow " - "on RootWindow\n\n"); - /* Create atoms */ atomClipboard = XInternAtom (pDisplay, "CLIPBOARD", False); atomClipboardManager = XInternAtom (pDisplay, "CLIPBOARD_MANAGER", False); @@ -260,6 +251,13 @@ winClipboardProc (void *pvNotUsed) pthread_exit (NULL); } + /* Select event types to watch */ + if (XSelectInput (pDisplay, + iWindow, + PropertyChangeMask) == BadWindow) + ErrorF ("winClipboardProc - XSelectInput generated BadWindow " + "on messaging window\n"); + /* Save the window in the screen privates */ g_iClipboardWindow = iWindow; |