[Commits] SDL: x11: Fix a few more XMoveWindow() calls to adjust for borde...

libsdl.org revision control commits-owner at libsdl.org
Fri Mar 4 16:41:17 PST 2016


details:   https://hg.libsdl.org/SDL/rev/9cec5fe32bca
changeset: 10103:9cec5fe32bca
user:      Ryan C. Gordon <icculus at icculus.org>
date:      Fri Mar 04 19:41:16 2016 -0500
description:
x11: Fix a few more XMoveWindow() calls to adjust for border size.

Also, fix my inability to do basic math ('+' should have been '-').

diffstat:

 src/video/x11/SDL_x11window.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 11b490897d27 -r 9cec5fe32bca src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11window.c	Fri Mar 04 18:47:19 2016 -0500
+++ b/src/video/x11/SDL_x11window.c	Fri Mar 04 19:41:16 2016 -0500
@@ -781,7 +781,7 @@
     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
     Display *display = data->videodata->display;
 
-    X11_XMoveWindow(display, data->xwindow, window->x + data->border_left, window->y + data->border_top);
+    X11_XMoveWindow(display, data->xwindow, window->x - data->border_left, window->y - data->border_top);
     X11_XFlush(display);
 }
 
@@ -807,7 +807,7 @@
 
         /* See comment in X11_SetWindowSize. */
         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
-        X11_XMoveWindow(display, data->xwindow, window->x, window->y);
+        X11_XMoveWindow(display, data->xwindow, window->x - data->border_left, window->y - data->border_top);
         X11_XRaiseWindow(display, data->xwindow);
     }
 
@@ -836,7 +836,7 @@
 
         /* See comment in X11_SetWindowSize. */
         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
-        X11_XMoveWindow(display, data->xwindow, window->x, window->y);
+        X11_XMoveWindow(display, data->xwindow, window->x - data->border_left, window->y - data->border_top);
         X11_XRaiseWindow(display, data->xwindow);
     }
 
@@ -885,7 +885,7 @@
            and transitioning from windowed to fullscreen in Unity.
          */
         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
-        X11_XMoveWindow(display, data->xwindow, window->x, window->y);
+        X11_XMoveWindow(display, data->xwindow, window->x - data->border_left, window->y - data->border_top);
         X11_XRaiseWindow(display, data->xwindow);
     } else {
         X11_XResizeWindow(display, data->xwindow, window->w, window->h);


More information about the commits mailing list