[Libreoffice-commits] core.git: vcl/win
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 15 04:22:46 UTC 2021
vcl/win/app/salinfo.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 3c472ffe90bf5c496411c6d37ae832d9181c4ec9
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Jun 14 21:48:37 2021 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Jun 15 06:22:03 2021 +0200
Revert "tdf#142832: a blind fix - calculate rectangle size properly"
This reverts commit 57d122258437c0a14b303a8d961aa5e8f6f67f57.
Reason for revert:
As mentioned in https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowrect,
> In conformance with conventions for the RECT structure, the bottom-
> right coordinates of the returned rectangle are exclusive. In other
> words, the pixel at (right, bottom) lies immediately outside the
> rectangle.
So it was incorrect change.
Change-Id: I2b29871a5d9b944ce2f9119edb2e87c53d9ae298
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117212
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/vcl/win/app/salinfo.cxx b/vcl/win/app/salinfo.cxx
index 547e54ce54f6..2787797a6ce5 100644
--- a/vcl/win/app/salinfo.cxx
+++ b/vcl/win/app/salinfo.cxx
@@ -65,8 +65,10 @@ bool WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_I
if( it != m_aDeviceNameToMonitor.end() )
{
DisplayMonitor& rMon( m_aMonitors[ it->second ] );
- rMon.m_aArea = tools::Rectangle(aInfo.rcMonitor.left, aInfo.rcMonitor.top,
- aInfo.rcMonitor.right, aInfo.rcMonitor.bottom);
+ rMon.m_aArea = tools::Rectangle( Point( aInfo.rcMonitor.left,
+ aInfo.rcMonitor.top ),
+ Size( aInfo.rcMonitor.right - aInfo.rcMonitor.left,
+ aInfo.rcMonitor.bottom - aInfo.rcMonitor.top ) );
if( (aInfo.dwFlags & MONITORINFOF_PRIMARY) != 0 )
m_nPrimary = it->second;
}
More information about the Libreoffice-commits
mailing list