X11 backend: ignore a stale _NET_SUPPORTING_WM_CHECK; tested on NVIDIA Xorg
CI / test (push) Failing after 2m3s
CI / test (push) Failing after 2m3s
A window manager that was killed leaves the property on the root window, so Chandra opened a 1280x720 window instead of taking the screen (seen on a Vast.ai NVIDIA rig after pkill -9 openbox). Check that the window it names exists and points at itself, as EWMH says. docs/x11.md records the NVIDIA test (GTX 1650, driver 595.91.07). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hhLFs4VtHV26G1iyeo
This commit is contained in:
2 files changed
+21
-3
No files matched your search
+12
-3
@@ -748,9 +748,17 @@ pub fn X11Window::open(
|
|||||||
let a_wm_check = self.intern("_NET_SUPPORTING_WM_CHECK")
|
let a_wm_check = self.intern("_NET_SUPPORTING_WM_CHECK")
|
||||||
let a_pid = self.intern("_NET_WM_PID")
|
let a_pid = self.intern("_NET_WM_PID")
|
||||||
// A window manager announces itself on the root window (EWMH); without one, take the screen.
|
// A window manager announces itself on the root window (EWMH); without one, take the screen.
|
||||||
|
// The property outlives a window manager that was killed, so also check that the window it
|
||||||
|
// names still exists and points at itself (EWMH).
|
||||||
let has_wm = match self.get_prop(root, a_wm_check) {
|
let has_wm = match self.get_prop(root, a_wm_check) {
|
||||||
Some(_) => true
|
Some(v) if v.length() >= 4 => {
|
||||||
None => false
|
let child = get32(v, 0)
|
||||||
|
match self.get_prop(child, a_wm_check) {
|
||||||
|
Some(c) if c.length() >= 4 && get32(c, 0) == child => true
|
||||||
|
_ => false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => false
|
||||||
}
|
}
|
||||||
self.session = !has_wm
|
self.session = !has_wm
|
||||||
if self.session {
|
if self.session {
|
||||||
@@ -1027,7 +1035,8 @@ fn X11Window::dispatch(self : X11Window, off : Int) -> Int {
|
|||||||
self.seg_attached = false
|
self.seg_attached = false
|
||||||
self.frame_pending = false
|
self.frame_pending = false
|
||||||
self.redraw = true
|
self.redraw = true
|
||||||
} else if self.errors_logged < 20 {
|
} else if self.errors_logged < 20 && !(major == 20 && err == 3) {
|
||||||
|
// (BadWindow from GetProperty is the window-manager check finding a stale window.)
|
||||||
self.errors_logged = self.errors_logged + 1
|
self.errors_logged = self.errors_logged + 1
|
||||||
@sys.log(
|
@sys.log(
|
||||||
"x11: X error " +
|
"x11: X error " +
|
||||||
|
|||||||
@@ -59,6 +59,15 @@ nested backend speaks Wayland: no libX11 or libxcb, and the same code runs in th
|
|||||||
* **Input injection** (XTest, `xdotool`, Selkies, VNC servers) works, since it arrives as ordinary
|
* **Input injection** (XTest, `xdotool`, Selkies, VNC servers) works, since it arrives as ordinary
|
||||||
X events.
|
X events.
|
||||||
|
|
||||||
|
## Tested on NVIDIA
|
||||||
|
|
||||||
|
2026-11-26 on a Vast.ai rig (GeForce GTX 1650, driver 595.91.07, the gamerig-tiny image's headless
|
||||||
|
NVIDIA Xorg on `:0`, depth 24, MIT-SHM): under Openbox with `--fullscreen`, on the whole screen
|
||||||
|
with no window manager (also after the window manager was killed and left a stale
|
||||||
|
`_NET_SUPPORTING_WM_CHECK`), following `xrandr --output DVI-D-0 --mode 1024x768`, and typing into
|
||||||
|
foot through XTest (`xdotool`, the way Selkies injects input). Not yet tried: a physical NVIDIA
|
||||||
|
desktop through a display manager.
|
||||||
|
|
||||||
## Limits
|
## Limits
|
||||||
|
|
||||||
* **Apps don't get the NVIDIA GPU through Chandra.** Chandra composes on the CPU and its Wayland
|
* **Apps don't get the NVIDIA GPU through Chandra.** Chandra composes on the CPU and its Wayland
|
||||||
|
|||||||
Reference in new issue
Block a user