FelixKratz / SketchyBar

A highly customizable macOS status bar replacement
https://felixkratz.github.io/SketchyBar/
GNU General Public License v3.0
6.67k stars 97 forks source link

[Bug] A space tracking error after quitting a full-screen application #528

Open Fau818 opened 8 months ago

Fau818 commented 8 months ago

I play Hearthstone (a game) on my Mac, it opens in full screen by default (occupying a new space). After I quit it, it causes incorrect space tracking.

For example, I only have space 1 right now, and when I open the game, the game will take up space 2. Then, I exit the game, and there should be only space 1 and it is selected.

But the fact is, if I trigger the space script at space 1, and print $NAME and $SELECTED in the script, it will output space.2 true.

This is incorrect, it should output space.1 true. And at this time, it seems like Sketchybar doesn't know I have space 1?

And if I trigger space_change event manually, the script will output space.1 true and space.2 true.

This is also incorrect, the space 2 should have been destroyed. After I trigger space_change event, the space script will be applied to both space 1 and space 2 (The space 1 can be detected by Sketchybar).


The expected behavior is that Sketchybar can correctly track space after quitting full-screen applications.

BLACKSWORD0 commented 5 months ago

I have the same problem. When I make an app full screen, I have to exit full screen by mission control. Otherwise no matter I exit fullscreen by cmd+q or click the green button, env.SELECTED display wrong and env.NAME still reserve the new space.