From c4effef0ec918f9f269d260dd02741d5d33621a6 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Sat, 14 Mar 2026 02:34:23 -0400 Subject: [PATCH] xwayland: fix missing title and icon with override-redirect toggle When an X11 client clears override-redirect on a window (i.e. it becomes "managed") without an unmap/map cycle, wlroots doesn't re-emit the set_title/class/icon events. We need to synthesize them to re-read the values from the surface. From what I can tell, only older/misbehaving X11 clients would actually do this (toggle override-redirect without unmap/map), so this is perhaps a bit pedantic, but an easy fix anyway. --- src/xwayland.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/xwayland.c b/src/xwayland.c index d16e41ac..77eaf3a1 100644 --- a/src/xwayland.c +++ b/src/xwayland.c @@ -1091,6 +1091,16 @@ xwayland_view_create(struct server *server, if (xsurface->surface) { handle_associate(&xwayland_view->associate, NULL); + /* + * If a surface is already associated, then we've + * missed the various initial set_* events as well. + * + * TODO: update_icon() -> handle_set_icon() after + * https://github.com/labwc/labwc/pull/2760 + */ + handle_set_title(&view->set_title, NULL); + handle_set_class(&xwayland_view->set_class, NULL); + update_icon(xwayland_view); } if (mapped) { handle_map(&xwayland_view->base.mappable.map, NULL);