removed unnecessary calls to SetWindowPos when entering and leaving
fullscreen mode. This caused the Position callback to fire more than necessary git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1478 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
aa38dc56b4
commit
6badc4e20a
@ -934,7 +934,6 @@ void fgPlatformGlutFullScreen( SFG_Window *win )
|
|||||||
s &= ~WS_OVERLAPPEDWINDOW;
|
s &= ~WS_OVERLAPPEDWINDOW;
|
||||||
s |= WS_POPUP;
|
s |= WS_POPUP;
|
||||||
SetWindowLong(win->Window.Handle, GWL_STYLE, s);
|
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
|
/* For fullscreen mode, find the monitor that is covered the most
|
||||||
* by the window and get its rect as the resize target.
|
* 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 */
|
/* restore style of window before making it fullscreen */
|
||||||
SetWindowLong(win->Window.Handle, GWL_STYLE, win->State.pWState.OldStyle);
|
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 */
|
/* Then resize */
|
||||||
SetWindowPos(win->Window.Handle,
|
SetWindowPos(win->Window.Handle,
|
||||||
|
Reference in New Issue
Block a user