xstate: Ignore Window/Drawable errors

Sometimes, windows will have actually been destroyed before we even
processed the events for it, so if we try to do something like get
properties on windows (as we do whenever a window is mapped) we will get
an error from the X server, but this is fine - we can just ignore this.

Should fix #16, #20, #22, etc.
This commit is contained in:
Shawn Wallace 2024-05-23 23:53:47 -04:00
parent 016cef6f72
commit 2444c2f07b
4 changed files with 176 additions and 72 deletions

View file

@ -511,6 +511,7 @@ impl<C: XConnection> ServerState<C> {
debug!("skipping setting window name to {name:?} because a _NET_WM_NAME title is already set");
None
} else {
debug!("setting {window:?} title to {name:?}");
*w = name;
Some(w)
}