summaryrefslogtreecommitdiffstats
path: root/vcl/unx/gtk3/gtkframe.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 05:03:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 05:03:24 +0000
commite3cf16e6fbf8d39cad8762f002b6db1d4f61ed36 (patch)
tree3c1753125149dcf36ba42a57f1574369e8524225 /vcl/unx/gtk3/gtkframe.cxx
parentAdding debian version 4:24.2.2-3. (diff)
downloadlibreoffice-e3cf16e6fbf8d39cad8762f002b6db1d4f61ed36.tar.xz
libreoffice-e3cf16e6fbf8d39cad8762f002b6db1d4f61ed36.zip
Merging upstream version 4:24.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vcl/unx/gtk3/gtkframe.cxx')
-rw-r--r--vcl/unx/gtk3/gtkframe.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index f996b4359b..8c097c526c 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -3953,12 +3953,24 @@ void GtkSalFrame::signalRealize(GtkWidget*, gpointer frame)
}
AbsoluteScreenPixelRectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(pVclParent, pThis->m_aFloatRect);
- if (gdk_window_get_window_type(widget_get_surface(pThis->m_pParent->m_pWindow)) != GDK_WINDOW_TOPLEVEL)
+ switch (gdk_window_get_window_type(widget_get_surface(pThis->m_pParent->m_pWindow)))
{
- // See tdf#152155 for an example
- gtk_coord nX(0), nY(0.0);
- gtk_widget_translate_coordinates(pThis->m_pParent->m_pWindow, widget_get_toplevel(pThis->m_pParent->m_pWindow), 0, 0, &nX, &nY);
- aFloatRect.Move(nX, nY);
+ case GDK_WINDOW_TOPLEVEL:
+ break;
+ case GDK_WINDOW_CHILD:
+ {
+ // See tdf#152155 for an example
+ gtk_coord nX(0), nY(0.0);
+ gtk_widget_translate_coordinates(pThis->m_pParent->m_pWindow, widget_get_toplevel(pThis->m_pParent->m_pWindow), 0, 0, &nX, &nY);
+ aFloatRect.Move(nX, nY);
+ break;
+ }
+ default:
+ {
+ // See tdf#154072 for an example
+ aFloatRect.Move(-pThis->m_pParent->maGeometry.x(), -pThis->m_pParent->maGeometry.y());
+ break;
+ }
}
GdkRectangle rect {static_cast<int>(aFloatRect.Left()), static_cast<int>(aFloatRect.Top()),