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:
parent
ffc4806f0b
commit
c243ac22ab
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue