diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-30 14:23:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-30 20:16:54 +0100 |
commit | 8c137ff0e201c2d0ecd1bb567496dbed8e5eced7 (patch) | |
tree | 05e9220a50a3d62b7bd2a2729392b6715fdfb711 /vcl/unx | |
parent | 7c01983c52b055fc1777dc16c1b4059d5940fdf8 (diff) |
gtk[3|4] allow anything that would enable positioning onscreen
Change-Id: I68a96c4ae860c705108f4aaaf23e4bd05badf849
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126127
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index b10a051d963b..f9546a5ebe43 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -9797,23 +9797,20 @@ bool show_menu_newer_gtk(GtkWidget* pComboBox, GtkWindow* pMenu, const GdkRectan GdkGravity rect_anchor; GdkGravity menu_anchor; - GdkAnchorHints anchor_hints; if (ePlace == weld::Placement::Under) { rect_anchor = !bSwapForRTL ? GDK_GRAVITY_SOUTH_WEST : GDK_GRAVITY_SOUTH_EAST; menu_anchor = !bSwapForRTL ? GDK_GRAVITY_NORTH_WEST : GDK_GRAVITY_NORTH_EAST; - anchor_hints = static_cast<GdkAnchorHints>(GDK_ANCHOR_FLIP_Y | GDK_ANCHOR_RESIZE_Y | - GDK_ANCHOR_SLIDE_X | GDK_ANCHOR_RESIZE_X); } else { rect_anchor = !bSwapForRTL ? GDK_GRAVITY_NORTH_EAST : GDK_GRAVITY_NORTH_WEST; menu_anchor = !bSwapForRTL ? GDK_GRAVITY_NORTH_WEST : GDK_GRAVITY_NORTH_EAST; - anchor_hints = static_cast<GdkAnchorHints>(GDK_ANCHOR_FLIP_X | GDK_ANCHOR_RESIZE_Y | - GDK_ANCHOR_SLIDE_Y | GDK_ANCHOR_RESIZE_X); } + GdkAnchorHints anchor_hints = static_cast<GdkAnchorHints>(GDK_ANCHOR_FLIP | GDK_ANCHOR_SLIDE | GDK_ANCHOR_RESIZE); + GdkRectangle rect {x, y, rAnchor.width, rAnchor.height}; GdkSurface* toplevel = widget_get_surface(GTK_WIDGET(pMenu)); |