x11: Patched to compile with DEBUG_XEVENTS on C89 compilers.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 12 Feb 2016 00:27:21 -0500
changeset 10072 d2a1cd694861
parent 10071 f7e18e4f7c1d
child 10073 2455bf5d1866
x11: Patched to compile with DEBUG_XEVENTS on C89 compilers.
src/video/x11/SDL_x11events.c
--- a/src/video/x11/SDL_x11events.c	Mon Feb 15 21:49:09 2016 -0500
+++ b/src/video/x11/SDL_x11events.c	Fri Feb 12 00:27:21 2016 -0500
@@ -835,13 +835,13 @@
 
         /* Have we been resized or moved? */
     case ConfigureNotify:{
+            long border_left = 0;
+            long border_top = 0;
 #ifdef DEBUG_XEVENTS
             printf("window %p: ConfigureNotify! (position: %d,%d, size: %dx%d)\n", data,
                    xevent.xconfigure.x, xevent.xconfigure.y,
                    xevent.xconfigure.width, xevent.xconfigure.height);
 #endif
-            long border_left = 0;
-            long border_top = 0;
             if (data->xwindow) {
                 Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0);
                 Atom type;
@@ -1229,11 +1229,11 @@
         break;
 
     case SelectionNotify: {
+            Atom target = xevent.xselection.target;
 #ifdef DEBUG_XEVENTS
             printf("window %p: SelectionNotify (requestor = %ld, target = %ld)\n", data,
                 xevent.xselection.requestor, xevent.xselection.target);
 #endif
-            Atom target = xevent.xselection.target;
             if (target == data->xdnd_req) {
                 /* read data */
                 SDL_x11Prop p;