mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-30 14:20:14 +01:00
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>
This commit is contained in:
parent
b997b3849d
commit
7cb1622ce4
1 changed files with 7 additions and 9 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue