xstate: avoid crashing if setting fullscreen state fails

Could be triggered by spamming alt+z with gpu-screen-recorder-ui.
This commit is contained in:
Shawn Wallace 2025-01-07 21:41:28 -05:00
parent b699ce62a1
commit 42ffd06d1e

View file

@ -897,15 +897,17 @@ impl XConnection for RealConnection {
} else { } else {
&[] &[]
}; };
self.connection
if let Err(e) = self.connection
.send_and_check_request(&x::ChangeProperty::<x::Atom> { .send_and_check_request(&x::ChangeProperty::<x::Atom> {
mode: x::PropMode::Replace, mode: x::PropMode::Replace,
window, window,
property: atoms.net_wm_state, property: atoms.net_wm_state,
r#type: x::ATOM_ATOM, r#type: x::ATOM_ATOM,
data, data,
}) }) {
.unwrap(); warn!("Failed to set fullscreen state on {window:?} ({e})");
}
} }
fn focus_window( fn focus_window(