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;