shell: Don't unconditionally focus on unfullscreen

This commit is contained in:
Victoria Brekenfeld 2025-07-17 18:29:57 +02:00 committed by Victoria Brekenfeld
parent a74c90f14f
commit 0ef372f797
3 changed files with 35 additions and 10 deletions

View file

@ -181,11 +181,9 @@ impl ToplevelManagementHandler for State {
window: &<Self as ToplevelInfoHandler>::Window,
) {
let mut shell = self.common.shell.write();
if let Some(target) = shell.unfullscreen_request(window, &self.common.event_loop_handle) {
let seat = shell.seats.last_active().clone();
std::mem::drop(shell);
Shell::set_focus(self, Some(&target), &seat, None, true);
}
let _ = shell.unfullscreen_request(window, &self.common.event_loop_handle);
// don't switch focus because of a programmatic action.
// If the toplevel-management client intends to focus the now unfullscreened toplevel, it can send an `activate`-request.
}
fn maximize(&mut self, _dh: &DisplayHandle, window: &<Self as ToplevelInfoHandler>::Window) {