diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:03:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:03:13 +0000 |
commit | 26f6ae4122fcce6bafa71c064f5e645c39022082 (patch) | |
tree | b0e0916f682785b3a983b71950c4623988ca6eef /vcl/unx/gtk3/gtkframe.cxx | |
parent | Adding upstream version 4:24.2.2. (diff) | |
download | libreoffice-26f6ae4122fcce6bafa71c064f5e645c39022082.tar.xz libreoffice-26f6ae4122fcce6bafa71c064f5e645c39022082.zip |
Adding upstream version 4:24.2.3.upstream/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.cxx | 22 |
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()), |