]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xwayland: Handle min width/height in configure
authorJoshua Ashton <joshua@froggi.es>
Sun, 17 Oct 2021 18:34:49 +0000 (18:34 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 17 Oct 2021 18:49:05 +0000 (19:49 +0100)
Signed-off-by: Joshua Ashton <joshua@froggi.es>
src/xwayland.c

index 9fc60b95b7cb5b8631385ed88dc9b6b0adfc0629..345eb2df6bde6cd5c5676abec3fa082c7e3dcbd8 100644 (file)
@@ -97,8 +97,15 @@ handle_request_configure(struct wl_listener *listener, void *data)
 {
        struct view *view = wl_container_of(listener, view, request_configure);
        struct wlr_xwayland_surface_configure_event *event = data;
-       wlr_xwayland_surface_configure(view->xwayland_surface, event->x,
-                                      event->y, event->width, event->height);
+       
+       int min_width, min_height;
+       view_min_size(view, &min_width, &min_height);
+
+       wlr_xwayland_surface_configure(view->xwayland_surface,
+               event->x,
+               event->y,
+               max(event->width, min_width),
+               max(event->height, min_height));
        damage_all_outputs(view->server);
 }