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:
parent
016cef6f72
commit
2444c2f07b
4 changed files with 176 additions and 72 deletions
|
|
@ -1150,7 +1150,11 @@ impl<C: XConnection> Dispatch<XwaylandSurfaceV1, ObjectKey> for ServerState<C> {
|
|||
.zip((data.surface_serial.is_some_and(|s| s == serial)).then_some(data))
|
||||
})
|
||||
{
|
||||
debug!("associate surface {} with {:?}", data.server.id().protocol_id(), win);
|
||||
debug!(
|
||||
"associate surface {} with {:?}",
|
||||
data.server.id().protocol_id(),
|
||||
win
|
||||
);
|
||||
window_data.surface_key = Some(*key);
|
||||
state.associated_windows.insert(*key, win);
|
||||
if window_data.mapped {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue