diff options
author | Colin Harrison <colin.harrison@virgin.net> | 2009-06-10 13:32:54 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-06-10 14:00:43 +0100 |
commit | 803522300344265f11ea9f869ee6747730413bae (patch) | |
tree | c36ef2240d4f1ff7156e5d52c5d74da0ef32c79b | |
parent | c7d3965bee0edb72468a0135aaa8a081348c2b23 (diff) |
Xming: Simplify logic for ownership release of native clipboard
Make the logic simpler for the ownership release of the Windows
clipboard in winclipboardwrappers.c - We've already marked a selection
as unowned if it is owned by our clipboard 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>
-rwxr-xr-x | hw/xwin/winclipboardwrappers.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c index 14f76cd9b..c68d78aa3 100755 --- a/hw/xwin/winclipboardwrappers.c +++ b/hw/xwin/winclipboardwrappers.c @@ -437,11 +437,9 @@ winProcSetSelectionOwner (ClientPtr client) * an owned to not owned transition was detected, * and we currently own the Win32 clipboard. */ - if (None == stuff->window - && (None == s_iOwners[CLIP_OWN_PRIMARY] - || g_iClipboardWindow == s_iOwners[CLIP_OWN_PRIMARY]) - && (None == s_iOwners[CLIP_OWN_CLIPBOARD] - || g_iClipboardWindow == s_iOwners[CLIP_OWN_CLIPBOARD]) + if (stuff->window == None + && s_iOwners[CLIP_OWN_PRIMARY] == None + && s_iOwners[CLIP_OWN_CLIPBOARD] == None && fOwnedToNotOwned && g_hwndClipboard != NULL && g_hwndClipboard == GetClipboardOwner ()) @@ -458,10 +456,6 @@ winProcSetSelectionOwner (ClientPtr client) EmptyClipboard (); CloseClipboard (); - /* Clear X selection ownership (might still be marked as us owning) */ - s_iOwners[CLIP_OWN_PRIMARY] = None; - s_iOwners[CLIP_OWN_CLIPBOARD] = None; - goto winProcSetSelectionOwner_Done; } |