diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-28 20:55:40 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-29 14:35:27 +0100 |
commit | 5ac3106bf80c91ef71446b51a90fdc0025e10f7b (patch) | |
tree | 7fbc177bdfe848d4d0d707baca4a1774b0904efa /vcl/unx | |
parent | e1ca21116a05552dbabeed50b671aa02f282cb25 (diff) |
gtk3: set anchor_hints for gdk_window_move_to_rect
Change-Id: Id7d79e0b505cfaadf1dbae770b69eea46b43157c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125988
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 523525e445a2..b10a051d963b 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -9797,24 +9797,27 @@ 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); } GdkRectangle rect {x, y, rAnchor.width, rAnchor.height}; GdkSurface* toplevel = widget_get_surface(GTK_WIDGET(pMenu)); - window_move_to_rect(toplevel, &rect, rect_anchor, menu_anchor, static_cast<GdkAnchorHints>(0), - /*static_cast<GdkAnchorHints>(GDK_ANCHOR_FLIP_Y | GDK_ANCHOR_RESIZE_Y | - GDK_ANCHOR_SLIDE_X | GDK_ANCHOR_RESIZE_X),*/ + window_move_to_rect(toplevel, &rect, rect_anchor, menu_anchor, anchor_hints, 0, 0); return true; |