diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-03-21 16:32:41 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-05-02 15:38:34 +0200 |
commit | 7876d1f28161f244fe837f2ed5bc348cfdac10de (patch) | |
tree | 86c27a042ed6e2de985e5ccc00438c8f3ebf9041 /nx-X11/programs/Xserver/hw/nxagent | |
parent | 30cd3a6c24b2097c30fa2f81c9908aff174e0980 (diff) | |
download | nx-libs-7876d1f28161f244fe837f2ed5bc348cfdac10de.tar.gz nx-libs-7876d1f28161f244fe837f2ed5bc348cfdac10de.tar.bz2 nx-libs-7876d1f28161f244fe837f2ed5bc348cfdac10de.zip |
hw/nxagent/Events.c: Only declare and assign message_data and box variables if compiled with -DTEST / -DDEBUG (plus drop commented out code).
Amends the following compiler warnings:
```
Events.c: In function ‘nxagentHandleClientMessageEvent’:
Events.c:2694:13: warning: variable ‘message_data’ set but not used [-Wunused-but-set-variable]
char *message_data;
^
Events.c: In function ‘nxagentClipAndSendExpose’:
Events.c:4313:10: warning: variable ‘box’ set but not used [-Wunused-but-set-variable]
BoxRec box;
^
```
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 12b941530..0631d8d79 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2687,7 +2687,9 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) if (message_type == MakeAtom("WM_PROTOCOLS", strlen("WM_PROTOCOLS"), False)) { + #ifdef TEST char *message_data; + #endif x.u.u.type = ClientMessage; x.u.u.detail = X -> xclient.format; @@ -2706,12 +2708,12 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) return 0; } + #ifdef TEST else { message_data = validateString(NameForAtom(x.u.clientMessage.u.l.longs0)); } - #ifdef TEST fprintf(stderr, "nxagentHandleClientMessageEvent: Sent client message of type WM_PROTOCOLS " "and value [%s].\n", message_data); #endif @@ -3119,28 +3121,6 @@ int nxagentCheckWindowConfiguration(XConfigureEvent* X) unsigned int nchildren_return = 0; Status result; - WindowPtr pWin; - - pWin = nxagentWindowPtr(X -> window); - - /* - * This optimization has some problems to - * work in rootless mode inside NXWin. To - * verify this you can launch xterm and - * another application, f.e. firefox. By - * raising xterm above firefox, the stack - * order seems to become incoherent showing - * the underneath window content in the - * overlapping area when the mouse botton is - * pressed with the pointer inside of such area. - * - * if ((pWin != NULL) && X -> override_redirect == 0) - * { - * return 1; - * } - * - */ - if (win == X -> window) { if (x != X -> x || @@ -4304,7 +4284,10 @@ int nxagentClipAndSendExpose(WindowPtr pWin, void * ptr) { RegionPtr exposeRgn; RegionPtr remoteExposeRgn; + + #ifdef DEBUG BoxRec box; + #endif #ifdef DEBUG fprintf(stderr, "nxagentClipAndSendExpose: Called.\n"); @@ -4316,16 +4299,16 @@ int nxagentClipAndSendExpose(WindowPtr pWin, void * ptr) { exposeRgn = RegionCreate(NULL, 1); + #ifdef DEBUG box = *RegionExtents(remoteExposeRgn); - #ifdef DEBUG fprintf(stderr, "nxagentClipAndSendExpose: Root expose extents: [%d] [%d] [%d] [%d].\n", box.x1, box.y1, box.x2, box.y2); #endif + #ifdef DEBUG box = *RegionExtents(&pWin -> clipList); - #ifdef DEBUG fprintf(stderr, "nxagentClipAndSendExpose: Clip list extents for window at [%p]: [%d] [%d] [%d] [%d].\n", pWin, box.x1, box.y1, box.x2, box.y2); #endif |