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>
This commit is contained in:
parent
c7d3965bee
commit
8035223003
|
@ -437,11 +437,9 @@ winProcSetSelectionOwner (ClientPtr client)
|
||||||
* an owned to not owned transition was detected,
|
* an owned to not owned transition was detected,
|
||||||
* and we currently own the Win32 clipboard.
|
* and we currently own the Win32 clipboard.
|
||||||
*/
|
*/
|
||||||
if (None == stuff->window
|
if (stuff->window == None
|
||||||
&& (None == s_iOwners[CLIP_OWN_PRIMARY]
|
&& s_iOwners[CLIP_OWN_PRIMARY] == None
|
||||||
|| g_iClipboardWindow == s_iOwners[CLIP_OWN_PRIMARY])
|
&& s_iOwners[CLIP_OWN_CLIPBOARD] == None
|
||||||
&& (None == s_iOwners[CLIP_OWN_CLIPBOARD]
|
|
||||||
|| g_iClipboardWindow == s_iOwners[CLIP_OWN_CLIPBOARD])
|
|
||||||
&& fOwnedToNotOwned
|
&& fOwnedToNotOwned
|
||||||
&& g_hwndClipboard != NULL
|
&& g_hwndClipboard != NULL
|
||||||
&& g_hwndClipboard == GetClipboardOwner ())
|
&& g_hwndClipboard == GetClipboardOwner ())
|
||||||
|
@ -458,10 +456,6 @@ winProcSetSelectionOwner (ClientPtr client)
|
||||||
EmptyClipboard ();
|
EmptyClipboard ();
|
||||||
CloseClipboard ();
|
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;
|
goto winProcSetSelectionOwner_Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue