src/video/x11/SDL_x11window.c
changeset 10103 9cec5fe32bca
parent 10102 11b490897d27
equal deleted inserted replaced
10102:11b490897d27 10103:9cec5fe32bca
   779 X11_SetWindowPosition(_THIS, SDL_Window * window)
   779 X11_SetWindowPosition(_THIS, SDL_Window * window)
   780 {
   780 {
   781     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   781     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   782     Display *display = data->videodata->display;
   782     Display *display = data->videodata->display;
   783 
   783 
   784     X11_XMoveWindow(display, data->xwindow, window->x + data->border_left, window->y + data->border_top);
   784     X11_XMoveWindow(display, data->xwindow, window->x - data->border_left, window->y - data->border_top);
   785     X11_XFlush(display);
   785     X11_XFlush(display);
   786 }
   786 }
   787 
   787 
   788 void
   788 void
   789 X11_SetWindowMinimumSize(_THIS, SDL_Window * window)
   789 X11_SetWindowMinimumSize(_THIS, SDL_Window * window)
   805 
   805 
   806          X11_XFree(sizehints);
   806          X11_XFree(sizehints);
   807 
   807 
   808         /* See comment in X11_SetWindowSize. */
   808         /* See comment in X11_SetWindowSize. */
   809         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
   809         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
   810         X11_XMoveWindow(display, data->xwindow, window->x, window->y);
   810         X11_XMoveWindow(display, data->xwindow, window->x - data->border_left, window->y - data->border_top);
   811         X11_XRaiseWindow(display, data->xwindow);
   811         X11_XRaiseWindow(display, data->xwindow);
   812     }
   812     }
   813 
   813 
   814     X11_XFlush(display);
   814     X11_XFlush(display);
   815 }
   815 }
   834 
   834 
   835          X11_XFree(sizehints);
   835          X11_XFree(sizehints);
   836 
   836 
   837         /* See comment in X11_SetWindowSize. */
   837         /* See comment in X11_SetWindowSize. */
   838         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
   838         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
   839         X11_XMoveWindow(display, data->xwindow, window->x, window->y);
   839         X11_XMoveWindow(display, data->xwindow, window->x - data->border_left, window->y - data->border_top);
   840         X11_XRaiseWindow(display, data->xwindow);
   840         X11_XRaiseWindow(display, data->xwindow);
   841     }
   841     }
   842 
   842 
   843     X11_XFlush(display);
   843     X11_XFlush(display);
   844 }
   844 }
   883            properly update after the hints were changed. We don't do a
   883            properly update after the hints were changed. We don't do a
   884            hide/show, because there are supposedly subtle problems with doing so
   884            hide/show, because there are supposedly subtle problems with doing so
   885            and transitioning from windowed to fullscreen in Unity.
   885            and transitioning from windowed to fullscreen in Unity.
   886          */
   886          */
   887         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
   887         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
   888         X11_XMoveWindow(display, data->xwindow, window->x, window->y);
   888         X11_XMoveWindow(display, data->xwindow, window->x - data->border_left, window->y - data->border_top);
   889         X11_XRaiseWindow(display, data->xwindow);
   889         X11_XRaiseWindow(display, data->xwindow);
   890     } else {
   890     } else {
   891         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
   891         X11_XResizeWindow(display, data->xwindow, window->w, window->h);
   892     }
   892     }
   893 
   893