From 2a83202fddc4423fd102b0d5f19b0b445301a88e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 22 Jun 2021 18:58:38 +0200 Subject: wayland: apply CSD/SSD changes in the surface configure event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The configure event asks the client to change its decoration mode. The configured state should not be applied immediately. Clients must send an ack_configure in response to this event. See xdg_surface.configure and xdg_surface.ack_configure for details. In particular, ”the configured state should *not* be applied immediately”. Instead, treat CSD/SSD changes like all other window dimension related changes: store the to-be mode in win->configure, and apply it in the surface configure event. This fixes an issue where foot incorrectly resized the window when the server switched between CSD/SSD at run-time. --- quirks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'quirks.c') diff --git a/quirks.c b/quirks.c index 61b6d046..e4fe4a1f 100644 --- a/quirks.c +++ b/quirks.c @@ -46,7 +46,7 @@ quirk_weston_subsurface_desync_off(struct wl_subsurface *sub) void quirk_weston_csd_on(struct terminal *term) { - if (term->window->use_csd != CSD_YES) + if (term->window->csd_mode != CSD_YES) return; if (term->window->is_fullscreen) return; @@ -58,7 +58,7 @@ quirk_weston_csd_on(struct terminal *term) void quirk_weston_csd_off(struct terminal *term) { - if (term->window->use_csd != CSD_YES) + if (term->window->csd_mode != CSD_YES) return; if (term->window->is_fullscreen) return; -- cgit v1.3