mirror of
https://github.com/nestriness/nestri.git
synced 2026-11-03 22:22:39 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user