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
int width, height;
GdkRectangle anchor_rect;
int dx, dy;
+ int shadow_left, shadow_right, shadow_top, shadow_bottom;
int x = 0, y = 0;
- width = (impl->popup.unconstrained_width -
- (impl->shadow_left + impl->shadow_right));
- height = (impl->popup.unconstrained_height -
- (impl->shadow_top + impl->shadow_bottom));
+ gdk_popup_layout_get_shadow_width (layout,
+ &shadow_left,
+ &shadow_right,
+ &shadow_top,
+ &shadow_bottom);
+
+ width = (impl->popup.unconstrained_width - (shadow_left + shadow_right));
+ height = (impl->popup.unconstrained_height - (shadow_top + shadow_bottom));
anchor_rect = *gdk_popup_layout_get_anchor_rect (layout);
gdk_popup_layout_get_offset (layout, &dx, &dy);
GdkPopupLayout *layout,
gboolean ack_parent_configure)
{
- GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
GdkSurface *parent = surface->parent;
GdkWaylandSurface *parent_impl = GDK_WAYLAND_SURFACE (parent);
GdkWaylandDisplay *display =
GdkGravity rect_anchor;
GdkGravity surface_anchor;
GdkAnchorHints anchor_hints;
+ int shadow_left;
+ int shadow_right;
+ int shadow_top;
+ int shadow_bottom;
+ gdk_popup_layout_get_shadow_width (layout,
+ &shadow_left,
+ &shadow_right,
+ &shadow_top,
+ &shadow_bottom);
geometry = (GdkRectangle) {
- .x = impl->shadow_left,
- .y = impl->shadow_top,
- .width = width - (impl->shadow_left + impl->shadow_right),
- .height = height - (impl->shadow_top + impl->shadow_bottom),
+ .x = shadow_left,
+ .y = shadow_top,
+ .width = width - (shadow_left + shadow_right),
+ .height = height - (shadow_top + shadow_bottom),
};
anchor_rect = gdk_popup_layout_get_anchor_rect (layout);
g_assert_not_reached ();
}
+ gdk_popup_layout_get_shadow_width (layout,
+ &impl->shadow_left,
+ &impl->shadow_right,
+ &impl->shadow_top,
+ &impl->shadow_bottom);
+
if (grab_input_seat)
{
struct wl_seat *seat;