mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
xwayland: prevent overriding maximized/fullscreen/tiled geometry
Fixes an issue where some XWayland views (example: xfce4-terminal) do not end up with exactly the correct geometry when tiled.
This commit is contained in:
parent
aab8061dee
commit
5a2df57363
1 changed files with 15 additions and 6 deletions
|
|
@ -319,12 +319,21 @@ handle_request_configure(struct wl_listener *listener, void *data)
|
||||||
struct view *view = &xwayland_view->base;
|
struct view *view = &xwayland_view->base;
|
||||||
struct wlr_xwayland_surface_configure_event *event = data;
|
struct wlr_xwayland_surface_configure_event *event = data;
|
||||||
|
|
||||||
int width = event->width;
|
if (view_is_floating(view)) {
|
||||||
int height = event->height;
|
/* Honor client configure requests for floating views */
|
||||||
view_adjust_size(view, &width, &height);
|
struct wlr_box box = {.x = event->x, .y = event->y,
|
||||||
|
.width = event->width, .height = event->height};
|
||||||
xwayland_view_configure(view,
|
view_adjust_size(view, &box.width, &box.height);
|
||||||
(struct wlr_box){event->x, event->y, width, height});
|
xwayland_view_configure(view, box);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* Do not allow clients to request geometry other than
|
||||||
|
* what we computed for maximized/fullscreen/tiled
|
||||||
|
* views. Ignore the client request and send back a
|
||||||
|
* ConfigureNotify event with the computed geometry.
|
||||||
|
*/
|
||||||
|
xwayland_view_configure(view, view->pending);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue