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

Clipboard.c: some scope optimizations

parent 85a28a68
...@@ -424,9 +424,6 @@ void nxagentClearSelection(XEvent *X) ...@@ -424,9 +424,6 @@ void nxagentClearSelection(XEvent *X)
void nxagentRequestSelection(XEvent *X) void nxagentRequestSelection(XEvent *X)
{ {
#ifdef DEBUG
int result;
#endif
int i = 0; int i = 0;
XSelectionEvent eventSelection = {0}; XSelectionEvent eventSelection = {0};
...@@ -507,7 +504,7 @@ FIXME: Do we need this? ...@@ -507,7 +504,7 @@ FIXME: Do we need this?
eventSelection.time = X->xselectionrequest.time; eventSelection.time = X->xselectionrequest.time;
#ifdef DEBUG #ifdef DEBUG
result = int result =
#endif #endif
XSendEvent(nxagentDisplay, XSendEvent(nxagentDisplay,
eventSelection.requestor, eventSelection.requestor,
...@@ -625,7 +622,7 @@ FIXME: Do we need this? ...@@ -625,7 +622,7 @@ FIXME: Do we need this?
eventSelection.time = X->xselectionrequest.time; eventSelection.time = X->xselectionrequest.time;
#ifdef DEBUG #ifdef DEBUG
result = int result =
#endif #endif
XSendEvent(nxagentDisplay, XSendEvent(nxagentDisplay,
eventSelection.requestor, eventSelection.requestor,
...@@ -971,8 +968,6 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -971,8 +968,6 @@ void nxagentCollectPropertyEvent(int resource)
void nxagentNotifySelection(XEvent *X) void nxagentNotifySelection(XEvent *X)
{ {
int result;
XSelectionEvent eventSelection; XSelectionEvent eventSelection;
#ifdef DEBUG #ifdef DEBUG
...@@ -1051,9 +1046,9 @@ void nxagentNotifySelection(XEvent *X) ...@@ -1051,9 +1046,9 @@ void nxagentNotifySelection(XEvent *X)
unsigned long ulReturnBytesLeft; unsigned long ulReturnBytesLeft;
unsigned char *pszReturnData = NULL; unsigned char *pszReturnData = NULL;
result = GetWindowProperty(lastSelectionOwner[i].windowPtr, clientCutProperty, 0, 0, False, int result = GetWindowProperty(lastSelectionOwner[i].windowPtr, clientCutProperty, 0, 0, False,
AnyPropertyType, &atomReturnType, &resultFormat, AnyPropertyType, &atomReturnType, &resultFormat,
&ulReturnItems, &ulReturnBytesLeft, &pszReturnData); &ulReturnItems, &ulReturnBytesLeft, &pszReturnData);
if (result == BadAlloc || result == BadAtom || if (result == BadAlloc || result == BadAtom ||
result == BadMatch || result == BadValue || result == BadMatch || result == BadValue ||
...@@ -1400,7 +1395,6 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1400,7 +1395,6 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
if (target == MakeAtom("TIMESTAMP", 9, 1)) if (target == MakeAtom("TIMESTAMP", 9, 1))
{ {
xEvent x;
int i = 0; int i = 0;
while ((i < NumCurrentSelections) && while ((i < NumCurrentSelections) &&
...@@ -1408,6 +1402,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1408,6 +1402,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
if (i < NumCurrentSelections) if (i < NumCurrentSelections)
{ {
xEvent x;
ChangeWindowProperty(pWin, ChangeWindowProperty(pWin,
property, property,
target, target,
......
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