From f647dfe874aa72166fbfd8c254b1c5f578f57bf5 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 4 Mar 2016 19:41:16 -0500 Subject: [PATCH] x11: Fix a few more XMoveWindow() calls to adjust for border size. Also, fix my inability to do basic math ('+' should have been '-'). --- src/video/x11/SDL_x11window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index 348276b0d..8659961d1 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -781,7 +781,7 @@ X11_SetWindowPosition(_THIS, SDL_Window * window) 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 @@ X11_SetWindowMinimumSize(_THIS, SDL_Window * window) /* 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 @@ X11_SetWindowMaximumSize(_THIS, SDL_Window * window) /* 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 @@ X11_SetWindowSize(_THIS, SDL_Window * window) 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);