src/video/windx5/SDL_dx5video.c
changeset 448 323c766f5a46
parent 443 778b970cec12
child 453 a6fa62b1be09
     1.1 --- a/src/video/windx5/SDL_dx5video.c	Mon Aug 19 02:34:22 2002 +0000
     1.2 +++ b/src/video/windx5/SDL_dx5video.c	Mon Aug 19 03:09:25 2002 +0000
     1.3 @@ -1080,7 +1080,7 @@
     1.4  
     1.5  		style = GetWindowLong(SDL_Window, GWL_STYLE);
     1.6  		style &= ~(resizestyle|WS_MAXIMIZE);
     1.7 -		if ( (video->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN ) {
     1.8 +		if ( video->flags & SDL_FULLSCREEN ) {
     1.9  			style &= ~windowstyle;
    1.10  			style |= directstyle;
    1.11  		} else {
    1.12 @@ -1102,6 +1102,7 @@
    1.13  
    1.14  		/* Resize the window (copied from SDL WinDIB driver) */
    1.15  		if ( SDL_windowid == NULL ) {
    1.16 +			HWND top;
    1.17  			UINT swp_flags;
    1.18  
    1.19  			SDL_resizing = 1;
    1.20 @@ -1117,11 +1118,16 @@
    1.21  			if ( y < 0 ) { /* Cover up title bar for more client area */
    1.22  				y -= GetSystemMetrics(SM_CYCAPTION)/2;
    1.23  			}
    1.24 -			swp_flags = (SWP_NOCOPYBITS | SWP_NOZORDER | SWP_SHOWWINDOW);
    1.25 -			if ( was_visible && !(flags & SDL_FULLSCREEN) ) {
    1.26 +			swp_flags = (SWP_NOCOPYBITS | SWP_FRAMECHANGED | SWP_SHOWWINDOW);
    1.27 +			if ( was_visible && (video->flags & SDL_FULLSCREEN) ) {
    1.28  				swp_flags |= SWP_NOMOVE;
    1.29  			}
    1.30 -			SetWindowPos(SDL_Window, NULL, x, y, width, height, swp_flags);
    1.31 +			if ( video->flags & SDL_FULLSCREEN ) {
    1.32 +				top = HWND_TOPMOST;
    1.33 +			} else {
    1.34 +				top = HWND_NOTOPMOST;
    1.35 +			}
    1.36 +			SetWindowPos(SDL_Window, top, x, y, width, height, swp_flags);
    1.37  			SDL_resizing = 0;
    1.38  			SetForegroundWindow(SDL_Window);
    1.39  		}