summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3/gtkinst.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-28 20:55:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-29 09:52:49 +0100
commit53f90ba47376aac928c6666d34ef62473052bf6d (patch)
tree79e8f37694df83483e5c6ce15b289e575aa228d5 /vcl/unx/gtk3/gtkinst.cxx
parent8662293d17a875f4389ea21be00e768e3de3d048 (diff)
gtk3: set anchor_hints for gdk_window_move_to_rect
Change-Id: Id7d79e0b505cfaadf1dbae770b69eea46b43157c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126007 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk3/gtkinst.cxx')
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx9
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;