From 63320437ed4e95246ce62193560098f986ac265c Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 5 Aug 2019 16:36:10 +0200 Subject: Clipboard.c: simplify nxagentGetClipboardWindow The second parameter was always NULL, so remove it. Also remove some debugging output which distracts while debugging as the function is called from ProcChangeProperty for _every_ property, also non-clipboard related ones. --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Clipboard.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 2f04d2960..c99c5f030 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -208,7 +208,7 @@ static void endTransfer(Bool success); void nxagentTransferSelection(int resource); void nxagentCollectPropertyEvent(int resource); void nxagentResetSelectionOwner(void); -WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin); +WindowPtr nxagentGetClipboardWindow(Atom property); void nxagentNotifyConvertFailure(ClientPtr client, Window requestor, Atom selection, Atom target, Time time); int nxagentSendNotify(xEvent *event); @@ -1667,12 +1667,8 @@ int nxagentSendNotify(xEvent *event) return 0; } -WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin) +WindowPtr nxagentGetClipboardWindow(Atom property) { - #ifdef DEBUG - fprintf(stderr, "%s: Got called, property [%d][%s] window [%p].\n", __func__, property, NameForAtom(property), (void *)pWin); - #endif - int i = nxagentFindLastSelectionOwnerIndex(nxagentLastRequestedSelection); if ((i < nxagentMaxSelections) && (property == clientCutProperty) && @@ -1686,13 +1682,8 @@ WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin) } else { - #ifdef DEBUG - fprintf(stderr, "%s: Returning original target window [%p].\n", __func__, (void *)pWin); - #endif - - return pWin; + return NULL; } - } int nxagentInitClipboard(WindowPtr pWin) -- cgit v1.2.3