Commit 4d435bce authored by Sam Lantinga's avatar Sam Lantinga

When querying the display size for a fullscreen window, the display size is...

When querying the display size for a fullscreen window, the display size is the size of the fullscreen video mode.
parent 7685a189
...@@ -94,9 +94,15 @@ X11_GetDisplaySize(_THIS, SDL_Window * window, int *w, int *h) ...@@ -94,9 +94,15 @@ X11_GetDisplaySize(_THIS, SDL_Window * window, int *w, int *h)
(SDL_DisplayData *) window->display->driverdata; (SDL_DisplayData *) window->display->driverdata;
XWindowAttributes attr; XWindowAttributes attr;
XGetWindowAttributes(data->display, RootWindow(data->display, XGetWindowAttributes(data->display, RootWindow(data->display, displaydata->screen), &attr);
displaydata->screen), if (window->flags & SDL_WINDOW_FULLSCREEN) {
&attr); /* The bounds when this window is visible is the fullscreen mode */
SDL_DisplayMode fullscreen_mode;
if (SDL_GetWindowDisplayMode(window, &fullscreen_mode) == 0) {
attr.width = fullscreen_mode.w;
attr.height = fullscreen_mode.h;
}
}
if (w) { if (w) {
*w = attr.width; *w = attr.width;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment