fix(nescope): send frame callbacks to Xwayland windows

Since frame callbacks moved onto the commit path, the commit handler
found a window by its xdg toplevel. An Xwayland window has none, so no
Proton game got a frame callback or presentation feedback. Xwayland then
completes a flip only on its one-second fallback timer, and a game
presenting FIFO stalls in the driver after its first frame.
This commit is contained in:
Wanjohi
2026-10-15 10:03:44 +03:00
parent 5f2ccdfbf2
commit 23ba9b5cae
+5 -5
View File
@@ -100,14 +100,14 @@ impl CompositorHandler for NescopeState {
s
};
// Matched on the window's surface, not its xdg toplevel: an Xwayland
// window has no toplevel, and matching on one left every Proton game
// without frame callbacks. Xwayland then completes a flip only on its
// one-second fallback timer, and a game presenting FIFO stalls.
let Some(window) = self
.space
.elements()
.find(|w| {
w.toplevel()
.map(|t| t.wl_surface() == &root)
.unwrap_or(false)
})
.find(|w| w.wl_surface().is_some_and(|s| *s == root))
.cloned()
else {
return;