Merge commit 'refs/merge-requests/16' of https://gitorious.org/solvespace/solvespace
commit
9c9a0d8c28
|
@ -108,8 +108,16 @@ void ThawWindowPosF(HWND hwnd, const char *subKey, const char *name)
|
|||
if(v)
|
||||
ShowWindow(hwnd, SW_MAXIMIZE);
|
||||
|
||||
RECT dr;
|
||||
GetWindowRect(GetDesktopWindow(), &dr);
|
||||
|
||||
HMONITOR hMonitor;
|
||||
MONITORINFO mi;
|
||||
RECT dr;
|
||||
|
||||
hMonitor = MonitorFromRect(&r, MONITOR_DEFAULTTONEAREST);
|
||||
|
||||
mi.cbSize = sizeof(mi);
|
||||
GetMonitorInfo(hMonitor, &mi);
|
||||
dr = mi.rcMonitor;
|
||||
|
||||
// If it somehow ended up off-screen, then put it back.
|
||||
Clamp(&(r.left), dr.left, dr.right);
|
||||
|
|
Loading…
Reference in New Issue