Panel: Add 'Intelligent (Dodge All Windows)' autohide option #13417
+100
−31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new panel visibility option called 'Intelligent (dodge all windows)'. It also renames the previous 'Intelligently hide panel' to 'Intelligent (dodge active window)'. The new option will make the panel hide if any window overlaps it, even if that window is not the active window. This option will stop the panel from popping up and down if the user is clicking between windows that may or may not cover the panel(such as if one window covers the panel and the other does not).
Changes:
cs_panel.py: Added the 'dodgeall' visibility option and label and renamed the 'intel' visibility option label.panel.js: Implemented logic for the 'Intelligent (dodge all windows)' option in the_updatePanelVisibilityfunction.Testing:
I copied the code to calculate window x/y as well as the code for determining if a window overlaps the panel from the original intelligent auto-hide case. I did this with the intention of keeping the code simple. Please let me know if there is a preferable or simpler approach. This is my first contribution to Cinnamon. I have tested this on bare metal and have not encountered any bugs, but I would appreciate a closer look at the logic to ensure that it aligns with the project's standards such as performance and code formatting.