X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffg_main_mswin.c;h=54ec12c5cb517e397cd6f109fcbb8cb975d681ae;hb=1592c962040f4a32ac1074f458b503db80241e58;hp=f528dd1afb96a8d8333c826e6f3f3f87b2154358;hpb=67f242b7dd68bea7dea467f9b5265c8448b6655e;p=freeglut diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index f528dd1..54ec12c 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -1640,8 +1640,7 @@ void fgPlatformPosResZordWork(SFG_Window* window, unsigned int workMask) /* For fullscreen mode, find the monitor that is covered the most * by the window and get its rect as the resize target. */ - GetWindowRect(window->Window.Handle, &rect); - hMonitor= MonitorFromRect(&rect, MONITOR_DEFAULTTONEAREST); + hMonitor= MonitorFromWindow(window->Window.Handle, MONITOR_DEFAULTTONEAREST); mi.cbSize = sizeof(mi); GetMonitorInfo(hMonitor, &mi); rect = mi.rcMonitor;