From 9417b01330cf36235f1b1dfa13fa1681ee4cbf88 Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Sat, 18 Oct 2014 16:22:39 +0000 Subject: [PATCH] small simplification git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1720 7f0cb862-5218-0410-a997-914c9d46530a --- src/mswin/fg_main_mswin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 1.7.10.4