[gtk/popup-shadow-width] wayland/popup: Append shadow width to configured size
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/popup-shadow-width] wayland/popup: Append shadow width to configured size
- Date: Thu, 11 Feb 2021 08:52:31 +0000 (UTC)
commit 5dabeba2e1fbbdcf82c2552a2f940bb095c0639b
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Feb 11 09:48:22 2021 +0100
wayland/popup: Append shadow width to configured size
The size is, just as xdg_toplevel.configure, the size of the window
geometry, not the surface.
gdk/wayland/gdksurface-wayland.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index f1909629a5..c9eed46ebb 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -630,12 +630,19 @@ static void
configure_popup_geometry (GdkSurface *surface)
{
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
+ int x, y;
+ int width, height;
+
+ x = impl->next_layout.popup.x - impl->shadow_left;
+ y = impl->next_layout.popup.y - impl->shadow_top;
+ width =
+ impl->next_layout.configured_width +
+ (impl->shadow_left + impl->shadow_right);
+ height =
+ impl->next_layout.configured_height +
+ (impl->shadow_top + impl->shadow_bottom);
- gdk_wayland_surface_move_resize (surface,
- impl->next_layout.popup.x,
- impl->next_layout.popup.y,
- impl->next_layout.configured_width,
- impl->next_layout.configured_height);
+ gdk_wayland_surface_move_resize (surface, x, y, width, height);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]