Commit 30fb45b2 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Clipboard.c: cleanup parentheses

parent d634f26b
...@@ -610,8 +610,8 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) ...@@ -610,8 +610,8 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
int nxagentFindLastSelectionOwnerIndex(XlibAtom sel) int nxagentFindLastSelectionOwnerIndex(XlibAtom sel)
{ {
int i = 0; int i = 0;
while ((i < nxagentMaxSelections) && while (i < nxagentMaxSelections &&
(lastSelectionOwner[i].selection != sel)) lastSelectionOwner[i].selection != sel)
{ {
i++; i++;
} }
...@@ -625,8 +625,8 @@ int nxagentFindLastSelectionOwnerIndex(XlibAtom sel) ...@@ -625,8 +625,8 @@ int nxagentFindLastSelectionOwnerIndex(XlibAtom sel)
int nxagentFindCurrentSelectionIndex(Atom sel) int nxagentFindCurrentSelectionIndex(Atom sel)
{ {
int i = 0; int i = 0;
while ((i < NumCurrentSelections) && while (i < NumCurrentSelections &&
(CurrentSelections[i].selection != sel)) CurrentSelections[i].selection != sel)
{ {
i++; i++;
} }
...@@ -1328,7 +1328,8 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X) ...@@ -1328,7 +1328,8 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X)
* the real X server). We now need to transfer it to the original * the real X server). We now need to transfer it to the original
* requestor, which is stored in the lastClient* variables. * requestor, which is stored in the lastClient* variables.
*/ */
if ((lastClientStage == SelectionStageNone) && (X->xselection.property == serverTransToAgentProperty)) if (lastClientStage == SelectionStageNone &&
X->xselection.property == serverTransToAgentProperty)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "%s: Starting selection transferral for client [%d].\n", __func__, fprintf(stderr, "%s: Starting selection transferral for client [%d].\n", __func__,
...@@ -1568,10 +1569,10 @@ void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data, ...@@ -1568,10 +1569,10 @@ void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
fprintf(stderr, "%s: pCurSel->selection [%s]\n", __func__, NameForAtom(pCurSel->selection)); fprintf(stderr, "%s: pCurSel->selection [%s]\n", __func__, NameForAtom(pCurSel->selection));
#endif #endif
if ((pCurSel->pWin != NULL) && if (pCurSel->pWin != NULL &&
(nxagentOption(Clipboard) != ClipboardNone) && /* FIXME: shouldn't we also check for != ClipboardClient? */ nxagentOption(Clipboard) != ClipboardNone && /* FIXME: shouldn't we also check for != ClipboardClient? */
((pCurSel->selection == XA_PRIMARY) || (pCurSel->selection == XA_PRIMARY ||
(pCurSel->selection == clientCLIPBOARD))) pCurSel->selection == clientCLIPBOARD))
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "%s: calling nxagentSetSelectionOwner\n", __func__); fprintf(stderr, "%s: calling nxagentSetSelectionOwner\n", __func__);
...@@ -1897,10 +1898,10 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1897,10 +1898,10 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
} }
#endif #endif
if ((target == clientTEXT) || if (target == clientTEXT ||
(target == XA_STRING) || target == XA_STRING ||
(target == clientCOMPOUND_TEXT) || target == clientCOMPOUND_TEXT ||
(target == clientUTF8_STRING)) target == clientUTF8_STRING)
{ {
lastClientWindowPtr = pWin; lastClientWindowPtr = pWin;
SetClientSelectionStage(None); SetClientSelectionStage(None);
...@@ -2109,8 +2110,9 @@ int nxagentSendNotify(xEvent *event) ...@@ -2109,8 +2110,9 @@ int nxagentSendNotify(xEvent *event)
WindowPtr nxagentGetClipboardWindow(Atom property) WindowPtr nxagentGetClipboardWindow(Atom property)
{ {
int i = nxagentFindLastSelectionOwnerIndex(nxagentLastRequestedSelection); int i = nxagentFindLastSelectionOwnerIndex(nxagentLastRequestedSelection);
if ((i < nxagentMaxSelections) && (property == clientCutProperty) && if (i < nxagentMaxSelections &&
(lastSelectionOwner[i].windowPtr != NULL)) property == clientCutProperty &&
lastSelectionOwner[i].windowPtr != NULL)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "%s: Returning last [%d] selection owner window [%p] (0x%x).\n", __func__, fprintf(stderr, "%s: Returning last [%d] selection owner window [%p] (0x%x).\n", __func__,
......
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