aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winclipboardwrappers.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/winclipboardwrappers.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/winclipboardwrappers.c')
-rw-r--r--xorg-server/hw/xwin/winclipboardwrappers.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/xorg-server/hw/xwin/winclipboardwrappers.c b/xorg-server/hw/xwin/winclipboardwrappers.c
index e7325178d..f1817f29b 100644
--- a/xorg-server/hw/xwin/winclipboardwrappers.c
+++ b/xorg-server/hw/xwin/winclipboardwrappers.c
@@ -241,25 +241,28 @@ winProcSetSelectionOwner (ClientPtr client)
/* Save selection owners for monitored selections, ignore other selections */
if (XA_PRIMARY == stuff->selection)
{
+ if (g_fClipboardPrimary)
+ {
/* Look for owned -> not owned transition */
- if (None == stuff->window
- && None != s_iOwners[CLIP_OWN_PRIMARY])
- {
- winDebug ("winProcSetSelectionOwner - PRIMARY - Going from "
- "owned to not owned.\n");
-
- /* Adjust last owned selection */
- if (None != s_iOwners[CLIP_OWN_CLIPBOARD])
- g_atomLastOwnedSelection = MakeAtom ("CLIPBOARD", 9, TRUE);
- else
- g_atomLastOwnedSelection = None;
- }
-
- /* Save new selection owner or None */
- s_iOwners[CLIP_OWN_PRIMARY] = stuff->window;
-
- winDebug ("winProcSetSelectionOwner - PRIMARY - Now owned by: 0x%x (clipboard is 0x%x)\n",
- stuff->window,g_iClipboardWindow);
+ if (None == stuff->window
+ && None != s_iOwners[CLIP_OWN_PRIMARY])
+ {
+ winDebug ("winProcSetSelectionOwner - PRIMARY - Going from "
+ "owned to not owned.\n");
+
+ /* Adjust last owned selection */
+ if (None != s_iOwners[CLIP_OWN_CLIPBOARD])
+ g_atomLastOwnedSelection = MakeAtom ("CLIPBOARD", 9, TRUE);
+ else
+ g_atomLastOwnedSelection = None;
+ }
+
+ /* Save new selection owner or None */
+ s_iOwners[CLIP_OWN_PRIMARY] = stuff->window;
+
+ winDebug ("winProcSetSelectionOwner - PRIMARY - Now owned by: 0x%x (clipboard is 0x%x)\n",
+ stuff->window,g_iClipboardWindow);
+ }
}
else if (MakeAtom ("CLIPBOARD", 9, TRUE) == stuff->selection)
{
@@ -271,7 +274,7 @@ winProcSetSelectionOwner (ClientPtr client)
"owned to not owned.\n");
/* Adjust last owned selection */
- if (None != s_iOwners[CLIP_OWN_PRIMARY])
+ if (None != s_iOwners[CLIP_OWN_PRIMARY] && g_fClipboardPrimary)
g_atomLastOwnedSelection = XA_PRIMARY;
else
g_atomLastOwnedSelection = None;
@@ -291,7 +294,7 @@ winProcSetSelectionOwner (ClientPtr client)
* clipboard manager then it should be marked as unowned since
* we will be taking ownership of the Win32 clipboard.
*/
- if (g_iClipboardWindow == s_iOwners[CLIP_OWN_PRIMARY])
+ if (g_iClipboardWindow == s_iOwners[CLIP_OWN_PRIMARY] && g_fClipboardPrimary)
s_iOwners[CLIP_OWN_PRIMARY] = None;
if (g_iClipboardWindow == s_iOwners[CLIP_OWN_CLIPBOARD])
s_iOwners[CLIP_OWN_CLIPBOARD] = None;