wl_backend: don't skip XWayland surfaces without initial class/title

X11 clients (like xterm) create their window first, then set WM_CLASS
before mapping. The previous code skipped surfaces that had no class
AND no title at new_surface time, marking them override_redirect. This
prevented xterm and other well-behaved X11 apps from ever being managed.

Fix: log a warning but continue registering listeners. The surface will
be managed when it maps (associate signal) at which point WM_CLASS is
typically set.
This commit is contained in:
Window Maker 2026-05-25 09:06:25 +02:00
parent ffc4806f0b
commit c243ac22ab
1 changed files with 1 additions and 10 deletions

View File

@ -1914,17 +1914,8 @@ handle_xwayland_new_surface(struct wl_listener *listener, void *data)
* management — apps that misbehave this way simply won't be managed,
* which is better than a broken-pipe crash. */
if (!xw->class && !xw->title) {
wwarning("wl_backend: xwayland classless surface 0x%x skipped (internal window)",
wwarning("wl_backend: xwayland surface 0x%x has no class/title yet — deferring",
(unsigned)xw->window_id);
/* Mark as override_redirect so XWM stops trying to composite it. */
if (wl_state.x_display) {
XSetWindowAttributes or_attr;
or_attr.override_redirect = True;
XChangeWindowAttributes(wl_state.x_display, (WNativeWindow)xw->window_id,
CWOverrideRedirect, &or_attr);
XFlush(wl_state.x_display);
}
return;
}
struct wl_toplevel_view *view = wmalloc(sizeof(*view));