Handle reparented windows correctly

Also refactored to avoid dealing with window properties until a window
is actually mapped.

Fixes #10
This commit is contained in:
Shawn Wallace 2024-05-17 22:43:00 -04:00
parent b8bd07ce93
commit 3afc9ffa9d
6 changed files with 456 additions and 164 deletions

View file

@ -118,7 +118,7 @@ impl Compositor {
}
}
#[derive(Debug)]
#[derive(Debug, Default)]
struct WindowData {
mapped: bool,
fullscreen: bool,
@ -135,7 +135,7 @@ impl FakeXConnection {
fn window(&mut self, window: Window) -> &mut WindowData {
self.windows
.get_mut(&window)
.expect("Unknown window: {window:?}")
.expect(&format!("Unknown window: {window:?}"))
}
}