|
From: <set...@us...> - 2006-03-29 02:01:10
|
Revision: 1171 Author: sethdill Date: 2006-03-28 18:00:53 -0800 (Tue, 28 Mar 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1171&view=rev Log Message: ----------- Fixed problem with the zoom button which caused the window to jump south. It only worked correctly if the window's titlebar was exactly 23 pixels tall. Now it asks the system for the title bar's and window's framing dimensions. See movewindow (at line 328) and movewindowhidden (at line 346). Modified Paths: -------------- Frontier/trunk/Common/source/frontierwindows.c Modified: Frontier/trunk/Common/source/frontierwindows.c =================================================================== --- Frontier/trunk/Common/source/frontierwindows.c 2006-03-28 21:58:28 UTC (rev 1170) +++ Frontier/trunk/Common/source/frontierwindows.c 2006-03-29 02:00:53 UTC (rev 1171) @@ -325,7 +325,12 @@ #endif #ifdef WIN95VERSION - setwindowpos (w, NULL, h - 4, v - 23, 0, 0, SWP_NOZORDER | SWP_NOSIZE); + int windowFramingHeight = 23; /* 2006-03-28 SMD - updated to use system-provided metrics instead of static values */ + int windowFramingWidth = 4; + + windowFramingHeight = GetSystemMetrics( SM_CYCAPTION ) + GetSystemMetrics( SM_CYFRAME ); + windowFramingWidth = GetSystemMetrics( SM_CXFRAME ); + setwindowpos (w, NULL, h - windowFramingWidth, v - windowFramingHeight, 0, 0, SWP_NOZORDER | SWP_NOSIZE); #endif } /*movewindow*/ @@ -338,7 +343,12 @@ #endif #ifdef WIN95VERSION - setwindowpos (w, NULL, h - 4, v - 23, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_HIDEWINDOW | SWP_NOACTIVATE); + int windowFramingHeight = 23; /* 2006-03-28 SMD - updated to use system-provided metrics instead of static values */ + int windowFramingWidth = 4; + + windowFramingHeight = GetSystemMetrics( SM_CYCAPTION ) + GetSystemMetrics( SM_CYFRAME ); + windowFramingWidth = GetSystemMetrics( SM_CXFRAME ); + setwindowpos (w, NULL, h - windowFramingWidth, v - windowFramingHeight, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_HIDEWINDOW | SWP_NOACTIVATE); #endif } /*movewindowhidden*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |