aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winclipboardthread.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-07 10:51:45 +0000
committermarha <marha@users.sourceforge.net>2011-03-07 10:51:45 +0000
commitfaed2dca735b7aa26a146c5e309cafa8134425b9 (patch)
tree497aab7a57588f4c697a764b97e6b12fbbc823ec /xorg-server/hw/xwin/winclipboardthread.c
parent4f15fcdc65f989800d91278a4040d14f9ebd76ca (diff)
downloadvcxsrv-faed2dca735b7aa26a146c5e309cafa8134425b9.tar.gz
vcxsrv-faed2dca735b7aa26a146c5e309cafa8134425b9.tar.bz2
vcxsrv-faed2dca735b7aa26a146c5e309cafa8134425b9.zip
Added clipboardprimary option to be able to only map THE CLIPBOARD selection to the windows clipboard. Default the CLIPBOARD and the PRIMARY selection are mapped.
Diffstat (limited to 'xorg-server/hw/xwin/winclipboardthread.c')
-rw-r--r--xorg-server/hw/xwin/winclipboardthread.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c
index 760ba5eb3..24b04c147 100644
--- a/xorg-server/hw/xwin/winclipboardthread.c
+++ b/xorg-server/hw/xwin/winclipboardthread.c
@@ -261,16 +261,19 @@ winClipboardProc (void *pvNotUsed)
/* Assert ownership of selections if Win32 clipboard is owned */
if (NULL != GetClipboardOwner ())
{
- /* PRIMARY */
- winDebug("winClipboardProc - asserted ownership.\n");
- iReturn = XSetSelectionOwner (pDisplay, XA_PRIMARY,
- iWindow, CurrentTime);
- if (iReturn == BadAtom || iReturn == BadWindow /*||
- XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow*/)
+ if (g_fClipboardPrimary)
+ {
+ /* PRIMARY */
+ winDebug("winClipboardProc - asserted ownership.\n");
+ iReturn = XSetSelectionOwner (pDisplay, XA_PRIMARY,
+ iWindow, CurrentTime);
+ if (iReturn == BadAtom || iReturn == BadWindow /*||
+ XGetSelectionOwner (pDisplay, XA_PRIMARY) != iWindow*/)
{
ErrorF ("winClipboardProc - Could not set PRIMARY owner\n");
goto thread_errorexit;
}
+ }
/* CLIPBOARD */
iReturn = XSetSelectionOwner (pDisplay, atomClipboard,