Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid broken state when acting on the only space in certain situations #182

Closed
dominiklohmann opened this issue Aug 1, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@dominiklohmann
Copy link
Collaborator

dominiklohmann commented Aug 1, 2019

Bug report

yabai / Dock.app currently end up in a broken state when

  • destroying the only non-fullscreen space on any display, or
  • moving the only non-fullscreen space from any display to another display.

In any of these situations yabai should return a non-zero exit code and print an appropriate message to stderr.

@koekeishiya
Copy link
Owner

Performing these checks could very possibly add noticable performance degradation to these features.

@koekeishiya koekeishiya added bug Something isn't working undetermined Not sure if this is considered a real bug labels Sep 3, 2019
@dominiklohmann
Copy link
Collaborator Author

Checking this manually with yabai -m query --spaces --display | jq -re "map(select(.\"native-fullscreen\" == 0)) | length > 1" takes less than 25ms on my computer for 10+ spaces and requires spawning two processes. What exactly do you think would cause a noticeable performance degradation here?

@koekeishiya
Copy link
Owner

Checking this manually with yabai -m query --spaces --display | jq -re "map(select(."native-fullscreen" == 0)) | length > 1" takes less than 25ms on my computer for 10+ spaces and requires spawning two processes. What exactly do you think would cause a noticeable performance degradation here?

I consider an additional 25ms noticable enough to be annoying (for me personally). The work pretty much consist of querying all spaces on the display of the space we are acting on, and checking the type of each space. It's not a huge deal, but it does feel kinda wasteful to me. I don't disagree that the confidence in the stability of said feature has more value to it.

@dominiklohmann
Copy link
Collaborator Author

Well, most of those 25ms is converting the output to json and parsing the jq script. I doubt it'd be more than 5ms when checking for this internally.

I just don't think any command should ever lead to a state only killall Dock can help with.

@koekeishiya koekeishiya added addressed on master; not released Fixed upstream, but not yet released and removed undetermined Not sure if this is considered a real bug labels Oct 1, 2019
@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants