aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-10-10 00:13:57 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-10-27 20:55:02 +0200
commite90306ec430f9baba85b35196e76b5745e5ff736 (patch)
tree2b155261139dd14a055ef5bbc93b64c58f82ac81 /nx-X11
parent85a28a68e90537c3b82e83bd8ff07a8e116ff00a (diff)
downloadnx-libs-e90306ec430f9baba85b35196e76b5745e5ff736.tar.gz
nx-libs-e90306ec430f9baba85b35196e76b5745e5ff736.tar.bz2
nx-libs-e90306ec430f9baba85b35196e76b5745e5ff736.zip
Clipboard.c: some scope optimizations
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index a9287150c..da1378815 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -424,9 +424,6 @@ void nxagentClearSelection(XEvent *X)
void nxagentRequestSelection(XEvent *X)
{
- #ifdef DEBUG
- int result;
- #endif
int i = 0;
XSelectionEvent eventSelection = {0};
@@ -507,7 +504,7 @@ FIXME: Do we need this?
eventSelection.time = X->xselectionrequest.time;
#ifdef DEBUG
- result =
+ int result =
#endif
XSendEvent(nxagentDisplay,
eventSelection.requestor,
@@ -625,7 +622,7 @@ FIXME: Do we need this?
eventSelection.time = X->xselectionrequest.time;
#ifdef DEBUG
- result =
+ int result =
#endif
XSendEvent(nxagentDisplay,
eventSelection.requestor,
@@ -971,8 +968,6 @@ void nxagentCollectPropertyEvent(int resource)
void nxagentNotifySelection(XEvent *X)
{
- int result;
-
XSelectionEvent eventSelection;
#ifdef DEBUG
@@ -1051,9 +1046,9 @@ void nxagentNotifySelection(XEvent *X)
unsigned long ulReturnBytesLeft;
unsigned char *pszReturnData = NULL;
- result = GetWindowProperty(lastSelectionOwner[i].windowPtr, clientCutProperty, 0, 0, False,
- AnyPropertyType, &atomReturnType, &resultFormat,
- &ulReturnItems, &ulReturnBytesLeft, &pszReturnData);
+ int result = GetWindowProperty(lastSelectionOwner[i].windowPtr, clientCutProperty, 0, 0, False,
+ AnyPropertyType, &atomReturnType, &resultFormat,
+ &ulReturnItems, &ulReturnBytesLeft, &pszReturnData);
if (result == BadAlloc || result == BadAtom ||
result == BadMatch || result == BadValue ||
@@ -1400,7 +1395,6 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
if (target == MakeAtom("TIMESTAMP", 9, 1))
{
- xEvent x;
int i = 0;
while ((i < NumCurrentSelections) &&
@@ -1408,6 +1402,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
if (i < NumCurrentSelections)
{
+ xEvent x;
ChangeWindowProperty(pWin,
property,
target,