Commit 63320437 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

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.
parent 1d05784b
...@@ -208,7 +208,7 @@ static void endTransfer(Bool success); ...@@ -208,7 +208,7 @@ static void endTransfer(Bool success);
void nxagentTransferSelection(int resource); void nxagentTransferSelection(int resource);
void nxagentCollectPropertyEvent(int resource); void nxagentCollectPropertyEvent(int resource);
void nxagentResetSelectionOwner(void); void nxagentResetSelectionOwner(void);
WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin); WindowPtr nxagentGetClipboardWindow(Atom property);
void nxagentNotifyConvertFailure(ClientPtr client, Window requestor, void nxagentNotifyConvertFailure(ClientPtr client, Window requestor,
Atom selection, Atom target, Time time); Atom selection, Atom target, Time time);
int nxagentSendNotify(xEvent *event); int nxagentSendNotify(xEvent *event);
...@@ -1667,12 +1667,8 @@ int nxagentSendNotify(xEvent *event) ...@@ -1667,12 +1667,8 @@ int nxagentSendNotify(xEvent *event)
return 0; 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); int i = nxagentFindLastSelectionOwnerIndex(nxagentLastRequestedSelection);
if ((i < nxagentMaxSelections) && (property == clientCutProperty) && if ((i < nxagentMaxSelections) && (property == clientCutProperty) &&
...@@ -1686,13 +1682,8 @@ WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin) ...@@ -1686,13 +1682,8 @@ WindowPtr nxagentGetClipboardWindow(Atom property, WindowPtr pWin)
} }
else else
{ {
#ifdef DEBUG return NULL;
fprintf(stderr, "%s: Returning original target window [%p].\n", __func__, (void *)pWin);
#endif
return pWin;
} }
} }
int nxagentInitClipboard(WindowPtr pWin) int nxagentInitClipboard(WindowPtr pWin)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment