Skip to content

Commit

Permalink
Fixed bug #725
Browse files Browse the repository at this point in the history
Don't let windows reposition the fullscreen window.
  • Loading branch information
slouken committed Sep 27, 2009
1 parent ac60885 commit 6867c58
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/video/wincommon/SDL_sysevents.c
Expand Up @@ -588,6 +588,22 @@ LRESULT CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return(0);
#endif /* WM_GETMINMAXINFO */

case WM_WINDOWPOSCHANGING: {
WINDOWPOS *windowpos = (WINDOWPOS*)lParam;

/* When menu is at the side or top, Windows likes
to try to reposition the fullscreen window when
changing video modes.
*/
if ( !SDL_resizing &&
SDL_PublicSurface &&
(SDL_PublicSurface->flags & SDL_FULLSCREEN) ) {
windowpos->x = 0;
windowpos->y = 0;
}
}
return(0);

case WM_WINDOWPOSCHANGED: {
SDL_VideoDevice *this = current_video;
int w, h;
Expand Down

0 comments on commit 6867c58

Please sign in to comment.