summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-09-25 16:33:10 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-09-26 07:11:21 +0200
commit460b11312214bb4cf08cecc22a35699e9e7c1889 (patch)
tree1d83622c439db50f32ae9de6aff63c507949d71d /vcl
parent0879fff079965065935c88a1ba48385548176a13 (diff)
tdf#160837 vcl: Use getter to get frame geometry
Instead of directly accessing the (currently still public) class member SalFrame::maGeometry, use the getter that returns a const reference to it. Change-Id: Iac7dd70b82160acba06d8016d94a1ac4380e779e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173955 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/syswin.cxx2
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx2
-rw-r--r--vcl/unx/gtk3/gtksalmenu.cxx4
4 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 3ad46e1f3768..5a07e45e3064 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1600,7 +1600,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
// except on rather small screens
// TODO: move GetScreenNumber from SystemWindow to Window ?
// currently we rely on internal privileges
- unsigned int nDisplayScreen = pWin->ImplGetWindowImpl()->mpFrame->maGeometry.screen();
+ unsigned int nDisplayScreen = pWin->ImplGetWindowImpl()->mpFrame->GetUnmirroredGeometry().screen();
tools::Rectangle aDispRect( Application::GetScreenPosSizePixel( nDisplayScreen ) );
tools::Long nScreenWidth = aDispRect.GetWidth() >= 800 ? aDispRect.GetWidth() : 800;
if( nMaxWidth > nScreenWidth/2 )
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index e37cb548daf1..ced6d530fc88 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -954,7 +954,7 @@ bool SystemWindow::ImplIsInTaskPaneList( vcl::Window* pWin )
unsigned int SystemWindow::GetScreenNumber() const
{
- return mpWindowImpl->mpFrame->maGeometry.screen();
+ return mpWindowImpl->mpFrame->GetUnmirroredGeometry().screen();
}
void SystemWindow::SetScreenNumber(unsigned int nDisplayScreen)
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 4bad56a9544e..8ad82a2a58ff 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -2257,7 +2257,7 @@ namespace
// this is the relatively unusual case where pParent is the toplevel GtkSalFrame and not a stock GtkWidget
// so use the same style of logic as GtkSalMenu::ShowNativePopupMenu to get the right position
AbsoluteScreenPixelRectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(pFrame->GetWindow(), rInRect);
- aFloatRect.Move(-pFrame->maGeometry.x(), -pFrame->maGeometry.y());
+ aFloatRect.Move(-pFrame->GetUnmirroredGeometry().x(), -pFrame->GetUnmirroredGeometry().y());
rOutRect = GdkRectangle{static_cast<int>(aFloatRect.Left()), static_cast<int>(aFloatRect.Top()),
static_cast<int>(aFloatRect.GetWidth()), static_cast<int>(aFloatRect.GetHeight())};
diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx
index fed134d179f9..a95d80a8c0ed 100644
--- a/vcl/unx/gtk3/gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtksalmenu.cxx
@@ -475,7 +475,7 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl
#if GTK_CHECK_VERSION(4, 0, 0)
AbsoluteScreenPixelRectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(xParent, rRect);
- aFloatRect.Move(-mpFrame->maGeometry.x(), -mpFrame->maGeometry.y());
+ aFloatRect.Move(-mpFrame->GetUnmirroredGeometry().x(), -mpFrame->GetUnmirroredGeometry().y());
GdkRectangle rect {static_cast<int>(aFloatRect.Left()), static_cast<int>(aFloatRect.Top()),
static_cast<int>(aFloatRect.GetWidth()), static_cast<int>(aFloatRect.GetHeight())};
@@ -496,7 +496,7 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl
if (gtk_check_version(3, 22, 0) == nullptr)
{
AbsoluteScreenPixelRectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(xParent, rRect);
- aFloatRect.Move(-mpFrame->maGeometry.x(), -mpFrame->maGeometry.y());
+ aFloatRect.Move(-mpFrame->GetUnmirroredGeometry().x(), -mpFrame->GetUnmirroredGeometry().y());
GdkRectangle rect {static_cast<int>(aFloatRect.Left()), static_cast<int>(aFloatRect.Top()),
static_cast<int>(aFloatRect.GetWidth()), static_cast<int>(aFloatRect.GetHeight())};