Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11window.c @ 4628:fad859023468
When querying the display size for a fullscreen window, the display size is the size of the fullscreen video mode.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 30 Jul 2010 00:55:00 -0700 |
parents | 844b5ef4b149 |
children | 7b1d35d98294 |
comparison
equal
deleted
inserted
replaced
4627:3b5f4b3a69e1 | 4628:fad859023468 |
---|---|
92 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; | 92 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; |
93 SDL_DisplayData *displaydata = | 93 SDL_DisplayData *displaydata = |
94 (SDL_DisplayData *) window->display->driverdata; | 94 (SDL_DisplayData *) window->display->driverdata; |
95 XWindowAttributes attr; | 95 XWindowAttributes attr; |
96 | 96 |
97 XGetWindowAttributes(data->display, RootWindow(data->display, | 97 XGetWindowAttributes(data->display, RootWindow(data->display, displaydata->screen), &attr); |
98 displaydata->screen), | 98 if (window->flags & SDL_WINDOW_FULLSCREEN) { |
99 &attr); | 99 /* The bounds when this window is visible is the fullscreen mode */ |
100 SDL_DisplayMode fullscreen_mode; | |
101 if (SDL_GetWindowDisplayMode(window, &fullscreen_mode) == 0) { | |
102 attr.width = fullscreen_mode.w; | |
103 attr.height = fullscreen_mode.h; | |
104 } | |
105 } | |
100 if (w) { | 106 if (w) { |
101 *w = attr.width; | 107 *w = attr.width; |
102 } | 108 } |
103 if (h) { | 109 if (h) { |
104 *h = attr.height; | 110 *h = attr.height; |