src/video/SDL_video.c
changeset 6547 38bc368a3b87
parent 6522 edacce9402fb
child 6554 5bcda034e678
     1.1 --- a/src/video/SDL_video.c	Wed Oct 03 13:39:42 2012 -0700
     1.2 +++ b/src/video/SDL_video.c	Wed Oct 03 18:54:31 2012 -0700
     1.3 @@ -933,13 +933,20 @@
     1.4      }
     1.5  
     1.6      /* Find the display containing the window */
     1.7 +    for (i = 0; i < _this->num_displays; ++i) {
     1.8 +        SDL_VideoDisplay *display = &_this->displays[i];
     1.9 +
    1.10 +        if (display->fullscreen_window == window) {
    1.11 +            return i;
    1.12 +        }
    1.13 +    }
    1.14      center.x = window->x + window->w / 2;
    1.15      center.y = window->y + window->h / 2;
    1.16      for (i = 0; i < _this->num_displays; ++i) {
    1.17          SDL_VideoDisplay *display = &_this->displays[i];
    1.18  
    1.19          SDL_GetDisplayBounds(i, &rect);
    1.20 -        if (display->fullscreen_window == window || SDL_EnclosePoints(&center, 1, &rect, NULL)) {
    1.21 +        if (SDL_EnclosePoints(&center, 1, &rect, NULL)) {
    1.22              return i;
    1.23          }
    1.24