summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-02-13 21:10:52 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-02-14 10:52:33 -0500
commite0c48e74bd34810a7dabf3d5bab81b31f4b47002 (patch)
tree262a11cdef1aa2f5968b135560cd593f1b6f41d3
parentad9c813ed1091e4d0263f2f477708108b4ff6591 (diff)
downloadgtk+-e0c48e74bd34810a7dabf3d5bab81b31f4b47002.tar.gz
win32: Apply popup shadow width
-rw-r--r--gdk/win32/gdksurface-win32.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index c690fed206..cd113bc4df 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -1201,6 +1201,12 @@ gdk_win32_surface_move (GdkSurface *surface,
gdk_win32_surface_move_resize_internal (surface, TRUE, x, y, -1, -1);
}
+static void gdk_win32_surface_set_shadow_width (GdkSurface *window,
+ int left,
+ int right,
+ int top,
+ int bottom);
+
static void
gdk_win32_surface_layout_popup (GdkSurface *surface,
int width,
@@ -1212,11 +1218,23 @@ gdk_win32_surface_layout_popup (GdkSurface *surface,
GdkRectangle bounds;
GdkRectangle final_rect;
int x, y;
+ int shadow_left, shadow_right, shadow_top, shadow_bottom;
monitor = gdk_surface_get_layout_monitor (surface, layout,
gdk_win32_monitor_get_workarea);
gdk_win32_monitor_get_workarea (monitor, &bounds);
+ gdk_popup_layout_get_shadow_width (layout,
+ &shadow_left,
+ &shadow_right,
+ &shadow_top,
+ &shadow_bottom);
+ gdk_win32_surface_set_shadow_width (surface,
+ shadow_left,
+ shadow_right,
+ shadow_top,
+ shadow_bottom);
+
gdk_surface_layout_popup_helper (surface,
width,
height,