Commit 1f023cd2 authored by Rob Bradford's avatar Rob Bradford

wayland: Constrain the window configure requests to the window's geometry

When we receive a configure event from Wayland telling us to resize our
surface we check against the geometry constraints for the window to ensure we
do not resize below the minimum and maximum limits.
parent 4107ef0b
......@@ -484,11 +484,22 @@ shell_surface_handle_configure(void *data,
int32_t height)
GdkWindow *window = GDK_WINDOW (data);
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkDisplay *display;
GdkEvent *event;
display = gdk_window_get_display (window);
gdk_window_constrain_size (&impl->geometry_hints,
/* TODO: Only generate a configure event if width or height have actually
* changed?
event = gdk_event_new (GDK_CONFIGURE);
event->configure.window = window;
event->configure.send_event = FALSE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment