From 82b19c8676251e63a6961d821fed78d79c3b2186 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 4 Oct 2009 20:30:45 +0000 Subject: [PATCH] Make the temporary black window be the maximum of all visible dimensions --HG-- branch : SDL-1.2 --- src/video/x11/SDL_x11modes.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c index 60d8dc0e6..802d06117 100644 --- a/src/video/x11/SDL_x11modes.c +++ b/src/video/x11/SDL_x11modes.c @@ -1008,12 +1008,8 @@ int X11_EnterFullScreen(_THIS) screen_w = DisplayWidth(SDL_Display, SDL_Screen); screen_h = DisplayHeight(SDL_Display, SDL_Screen); get_real_resolution(this, &real_w, &real_h); - if ( window_w > real_w ) { - real_w = MAX(real_w, screen_w); - } - if ( window_h > real_h ) { - real_h = MAX(real_h, screen_h); - } + real_w = MAX(window_w, MAX(real_w, screen_w)); + real_h = MAX(window_h, MAX(real_h, screen_h)); XMoveResizeWindow(SDL_Display, FSwindow, x, y, real_w, real_h); XMapRaised(SDL_Display, FSwindow);