[Winmerge-svn] SF.net SVN: winmerge: [4673] trunk/Src/Common/SplitterWndEx.cpp
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
From: <ki...@us...> - 2007-10-30 17:48:36
|
Revision: 4673 http://winmerge.svn.sourceforge.net/winmerge/?rev=4673&view=rev Author: kimmov Date: 2007-10-30 10:48:35 -0700 (Tue, 30 Oct 2007) Log Message: ----------- PATCH: [ 1788168 ] Better multi-monitor support Add comments explaining single/multimonitor behavior Submitted by highjinx Modified Paths: -------------- trunk/Src/Common/SplitterWndEx.cpp Modified: trunk/Src/Common/SplitterWndEx.cpp =================================================================== --- trunk/Src/Common/SplitterWndEx.cpp 2007-10-30 17:42:42 UTC (rev 4672) +++ trunk/Src/Common/SplitterWndEx.cpp 2007-10-30 17:48:35 UTC (rev 4673) @@ -214,6 +214,7 @@ { if (m_nCols == 2 && m_bAutoResizePanes) { + // If WinMerge spans multiple monitors, split the panes on the monitor split. CRect vSplitterWndRect; GetWindowRect(vSplitterWndRect); HMONITOR hLeftMonitor = MonitorFromPoint(vSplitterWndRect.TopLeft(), MONITOR_DEFAULTTONEAREST); @@ -229,6 +230,7 @@ int iDesiredWidthOfLeftPane = info.rcMonitor.right - vSplitterWndRect.left; int iDesiredWidthOfRightPane = vSplitterWndRect.right - info.rcMonitor.right; + // Edge case - don't split if either pane would be less than 100 pixels. if (iDesiredWidthOfLeftPane > 100 && iDesiredWidthOfRightPane > 100) { bSplitPanesInHalf = false; @@ -237,6 +239,9 @@ } } + // If we don't want to split panes across monitors, just split them in half. + // We want to do this so that if the window used to be split across monitors, + // but now occupies only a single monitor, then the panes are updated correctly. if (bSplitPanesInHalf) { CRect vSplitterWndRect; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |