Open ashleyharvey opened 7 months ago
Seems to work just fine for me. (did multiple attempts, also some with slight variations).
In the recording I use a rule to make the app enter fullscreen right after spawning, but the same behavior happens if that window opens/restores "natively" in fullscreen without the yabai rule as well.
(When quitting the fullscreen app you can see that it focuses the first space, before putting me back on the correct space; this is a macOS thing and it will always happen regardless of whether yabai is running or not).
Seems to work just fine for me. (did multiple attempts, also some with slight variations).
- Open Console.app
- Open Terminal.app
- Spawn new Terminal.app window
- Use this app to spawn a new app that opens in native-fullscreen mode
- Quit new app while inside native-fullscreen mode.
In the recording I use a rule to make the app enter fullscreen right after spawning, but the same behavior happens if that window opens/restores "natively" in fullscreen without the yabai rule as well.
(When quitting the fullscreen app you can see that it focuses the first space, before putting me back on the correct space; this is a macOS thing and it will always happen regardless of whether yabai is running or not).
Here's an example of the behaviour. Notice how after quitting mpv
it goes back to Finder
instead of Hydrus
.
I'm wondering if mpv
is doing some kind of non-native fullscreen and that's messing things up. Is there a way I can get more insight into what's happening with window/app ordering while it's happening?
https://github.com/koekeishiya/yabai/assets/3487945/6f4290a8-c1cd-4a3f-9ae9-60e535889228
Did some more investigation. If I instantiate mpv
with --no-native-fullscreen
, everything works as expected. It seems like it's native fullscreen that causes the issue. I think the difference between native and non-native fullscreen is that native fullscreen creates a new space to push the fullscreen window into, but I'm not sure.
Running v.7.0.4.
If I put yabai into stacked mode, and then have 2 apps back-to-front, where app2 is front-most:
Now app2 creates a new window:
Now app2 launches another app:
When I quit app3 I would expect to go back to:
However what happens is that I am returned to this, notice that app1 and app2 have swapped:
And have to manually re-arrange the apps to get back to what I was doing.
Edit: I just realized something important. When app2 launches app3, app3 goes straight into full-screen. If I quit from full-screen, I get the behaviour mentioned above. However, if I exit full-screen mode in app3 first, and then quit app3, I get the expected behaviour, which is for app2 to be the next front-most app after app3 quits.