From 12e86920286ff7c8ae5e650284535bac920eacee Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Fri, 23 Nov 2012 07:51:10 +0000 Subject: [PATCH] removed unnecessary calls to SetWindowPos when entering and leaving fullscreen mode. This caused the Position callback to fire more than necessary git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1478 7f0cb862-5218-0410-a997-914c9d46530a --- src/mswin/fg_window_mswin.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mswin/fg_window_mswin.c b/src/mswin/fg_window_mswin.c index 9c69d2e..f252948 100644 --- a/src/mswin/fg_window_mswin.c +++ b/src/mswin/fg_window_mswin.c @@ -934,7 +934,6 @@ void fgPlatformGlutFullScreen( SFG_Window *win ) s &= ~WS_OVERLAPPEDWINDOW; s |= WS_POPUP; SetWindowLong(win->Window.Handle, GWL_STYLE, s); - SetWindowPos(win->Window.Handle, HWND_TOP, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); /* For fullscreen mode, find the monitor that is covered the most * by the window and get its rect as the resize target. @@ -996,7 +995,6 @@ void fgPlatformGlutLeaveFullScreen( SFG_Window *win ) /* restore style of window before making it fullscreen */ SetWindowLong(win->Window.Handle, GWL_STYLE, win->State.pWState.OldStyle); - SetWindowPos(win->Window.Handle, HWND_TOP, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); /* Then resize */ SetWindowPos(win->Window.Handle, -- 1.7.10.4