Re-evaluate "default_orientation auto" when workspaces change outputs#9045
Open
mil-ad wants to merge 6 commits into
Open
Re-evaluate "default_orientation auto" when workspaces change outputs#9045mil-ad wants to merge 6 commits into
mil-ad wants to merge 6 commits into
Conversation
Workspaces created with default_orientation auto now re-orient when moved to a different output, evacuated on disconnect, restored on reconnect, or when output mode/transform changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When
default_orientation autois set, workspace layout (horizontal vs vertical) is determined by output dimensions at creation time but never re-evaluated. This means a workspace created on a landscape display keepsL_HORIZeven after moving to a portrait display, which defeats thepurpose of auto orientation in multi-monitor setups.
This patch adds
workspace_reorient_auto()which re-evaluates the layout based on the current output's aspect ratio. It is called when:move workspace to output)The function is conservative and only acts when:
default_orientationisauto(explicit horizontal/vertical is never touched)