It does, I went and checked. I'll have to continue to question my decision to continue to use Cosmic, I'm doubtful the window switcher for Mutter is compatible.
Yeah, the fact that you even asked that question had me doubting myself, so I also manually checked before replying. It's just something I take for granted.
Action::SwapWindow => {
let current_output = seat.active_output();
let mut shell = self.common.shell.write().unwrap();
let workspace = shell.active_space_mut(¤t_output);
if workspace.get_fullscreen().is_some() {
return; // TODO, is this what we want? Maybe disengage fullscreen instead?
}
let keyboard_handle = seat.get_keyboard().unwrap();
if let Some(focus) = keyboard_handle.current_focus() {
if let Some(descriptor) = workspace.node_desc(focus) {
let grab = SwapWindowGrab::new(seat.clone(), descriptor.clone());
drop(shell);
keyboard_handle.set_grab(self, grab, serial);
let mut shell = self.common.shell.write().unwrap();
shell.set_overview_mode(
Some(Trigger::KeyboardSwap(pattern, descriptor)),
self.common.event_loop_handle.clone(),
);
}
}
}
I can't immediately tell what that is doing, but I don't think it's the last window.
I think it's probably better to just focus on saving the active focussed window history from the compositer. It's definitely known, they highlight the active window. Then, the alt+tab switcher could just use that history. I just have wanted to focus on other things besides trying to submit pull requests for this type of thing. I haven't missed it that bad.
I just took a video earlier of myself switching windows and felt really dumb doing it.
I was just guessing based on the SwapWindow name. That you copied definition doesn't help me understand what it's supposed to do.
I'm surprised that [Super] + [Tab] and [Alt] + [Tab] aren't exactly what you're looking for because System(WindowSwitcher) seems like the name of something that would do exactly what you're after.
I haven't installed COSMIC, so I can't test it all out myself right now. But it feels like something that should exist as you described.
On Windows, "alt + tab" switches to the last active window first before moving through other applications. I found it helpful when I accidentally clicked off the focussed application. Is there a simple solution that has been made for Cosmic, Ubuntu, or another distro?