window-rules: add ignoreConfigureRequest

This allows to ignore X11 client side configure requests
like positioning and resizing and can be used to fight
some X11 applications that persist to have their windows
spawn at specific places and sizes.

Fixes: #1446
This commit is contained in:
Consolatis 2024-04-13 20:36:09 +02:00 committed by Johan Malm
parent 48e6c0009c
commit d67345564e
5 changed files with 15 additions and 2 deletions

View file

@ -377,8 +377,10 @@ handle_request_configure(struct wl_listener *listener, void *data)
wl_container_of(listener, xwayland_view, request_configure);
struct view *view = &xwayland_view->base;
struct wlr_xwayland_surface_configure_event *event = data;
bool ignore_configure_requests = window_rules_get_property(
view, "ignoreConfigureRequest") == LAB_PROP_TRUE;
if (view_is_floating(view)) {
if (view_is_floating(view) && !ignore_configure_requests) {
/* Honor client configure requests for floating views */
struct wlr_box box = {.x = event->x, .y = event->y,
.width = event->width, .height = event->height};