diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-11-01 18:18:51 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-11-09 20:33:38 +0000 |
commit | 9657eae5d65eff289089afc46dfb629758ebbdf7 (patch) | |
tree | d314363a285cd0f27dd971ae323c46116c2c0a96 /hw/xwin/winclipboardwrappers.c | |
parent | 062f49a8e0d1afb4dd32e9451a47ab2792639e7f (diff) |
Cygwin/X: Clearly diagnose a timeout while waiting for SelectionNotify event
Clearly diagnose a timeout while waiting for SelectionNotify event
in the clipboard integration internal client.
(which seems to be behind some of the reported failures)
Turn useless #if 0/ErrorF()/#endif into useful winDebug()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw/xwin/winclipboardwrappers.c')
-rwxr-xr-x | hw/xwin/winclipboardwrappers.c | 49 |
1 files changed, 17 insertions, 32 deletions
diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c index c68d78aa3..658d050d2 100755 --- a/hw/xwin/winclipboardwrappers.c +++ b/hw/xwin/winclipboardwrappers.c @@ -324,9 +324,7 @@ winProcSetSelectionOwner (ClientPtr client) REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); -#if 0 - ErrorF ("winProcSetSelectionOwner - Hello.\n"); -#endif + winDebug("winProcSetSelectionOwner - Hello.\n"); /* Watch for server reset */ if (s_ulServerGeneration != serverGeneration) @@ -369,10 +367,8 @@ winProcSetSelectionOwner (ClientPtr client) { fOwnedToNotOwned = TRUE; -#if 0 - ErrorF ("winProcSetSelectionOwner - PRIMARY - Going from " + winDebug("winProcSetSelectionOwner - PRIMARY - Going from " "owned to not owned.\n"); -#endif /* Adjust last owned selection */ if (None != s_iOwners[CLIP_OWN_CLIPBOARD]) @@ -384,10 +380,8 @@ winProcSetSelectionOwner (ClientPtr client) /* Save new selection owner or None */ s_iOwners[CLIP_OWN_PRIMARY] = stuff->window; -#if 0 - ErrorF ("winProcSetSelectionOwner - PRIMARY - Now owned by: %d\n", + winDebug("winProcSetSelectionOwner - PRIMARY - Now owned by: %d\n", stuff->window); -#endif } else if (MakeAtom ("CLIPBOARD", 9, TRUE) == stuff->selection) { @@ -396,11 +390,9 @@ winProcSetSelectionOwner (ClientPtr client) && None != s_iOwners[CLIP_OWN_CLIPBOARD]) { fOwnedToNotOwned = TRUE; - -#if 0 - ErrorF ("winProcSetSelectionOwner - CLIPBOARD - Going from " - "owned to not owned.\n"); -#endif + + winDebug("winProcSetSelectionOwner - CLIPBOARD - Going from " + "owned to not owned.\n"); /* Adjust last owned selection */ if (None != s_iOwners[CLIP_OWN_PRIMARY]) @@ -412,10 +404,9 @@ winProcSetSelectionOwner (ClientPtr client) /* Save new selection owner or None */ s_iOwners[CLIP_OWN_CLIPBOARD] = stuff->window; -#if 0 - ErrorF ("winProcSetSelectionOwner - CLIPBOARD - Now owned by: %d\n", - stuff->window); -#endif + winDebug("winProcSetSelectionOwner - CLIPBOARD - Now owned by: %d\n", + stuff->window); + } else goto winProcSetSelectionOwner_Done; @@ -444,13 +435,11 @@ winProcSetSelectionOwner (ClientPtr client) && g_hwndClipboard != NULL && g_hwndClipboard == GetClipboardOwner ()) { -#if 0 - ErrorF ("winProcSetSelectionOwner - We currently own the " - "clipboard and neither the PRIMARY nor the CLIPBOARD " - "selections are owned, releasing ownership of Win32 " - "clipboard.\n"); -#endif - + winDebug("winProcSetSelectionOwner - We currently own the " + "clipboard and neither the PRIMARY nor the CLIPBOARD " + "selections are owned, releasing ownership of Win32 " + "clipboard.\n"); + /* Release ownership of the Windows clipboard */ OpenClipboard (NULL); EmptyClipboard (); @@ -462,9 +451,7 @@ winProcSetSelectionOwner (ClientPtr client) /* Abort if no window at this point */ if (None == stuff->window) { -#if 0 - ErrorF ("winProcSetSelectionOwner - No window, returning.\n"); -#endif + winDebug("winProcSetSelectionOwner - No window, returning.\n"); goto winProcSetSelectionOwner_Done; } @@ -481,10 +468,8 @@ winProcSetSelectionOwner (ClientPtr client) /* Abort if clipboard manager is owning the selection */ if (pDrawable->id == g_iClipboardWindow) { -#if 0 - ErrorF ("winProcSetSelectionOwner - We changed ownership, " - "aborting.\n"); -#endif + winDebug("winProcSetSelectionOwner - We changed ownership, " + "aborting.\n"); goto winProcSetSelectionOwner_Done; } |