gtk3: drop faking initial nTopDecoration size from parent
in rtl we change the x pos. To change the x pos we need a y pos to go
with it, and taking the y pos before we get the true (0) top decoration
size of menu and menu-like widgets means rtl popdowns like the color
and highlight popdowns are vertically misplaced
there's no reason that a window would share the same decoration value
as its parent
Change-Id: I8cd1e96bb8ef7b0b728ff1baac5ee069325f9753
Reviewed-on: https://gerrit.libreoffice.org/43458
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 4b17e9e..7efff46 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1124,28 +1124,17 @@ void GtkSalFrame::InitCommon()
m_nHeightRequest = 0;
// fake an initial geometry, gets updated via configure event or SetPosSize
if( m_bDefaultPos || m_bDefaultSize )
if (m_bDefaultPos || m_bDefaultSize)
{
Size aDefSize = calcDefaultSize();
maGeometry.nX = -1;
maGeometry.nY = -1;
maGeometry.nWidth = aDefSize.Width();
maGeometry.nHeight = aDefSize.Height();
if( m_pParent )
{
// approximation
maGeometry.nTopDecoration = m_pParent->maGeometry.nTopDecoration;
maGeometry.nBottomDecoration = m_pParent->maGeometry.nBottomDecoration;
maGeometry.nLeftDecoration = m_pParent->maGeometry.nLeftDecoration;
maGeometry.nRightDecoration = m_pParent->maGeometry.nRightDecoration;
}
else
{
maGeometry.nTopDecoration = 0;
maGeometry.nBottomDecoration = 0;
maGeometry.nLeftDecoration = 0;
maGeometry.nRightDecoration = 0;
}
maGeometry.nTopDecoration = 0;
maGeometry.nBottomDecoration = 0;
maGeometry.nLeftDecoration = 0;
maGeometry.nRightDecoration = 0;
}
updateScreenNumber();