Preserve absolute frame coordinates on secondary displays#8
Open
TechDufus wants to merge 1 commit intojesseleite:masterfrom
Open
Preserve absolute frame coordinates on secondary displays#8TechDufus wants to merge 1 commit intojesseleite:masterfrom
TechDufus wants to merge 1 commit intojesseleite:masterfrom
Conversation
b437c0a to
3e14522
Compare
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.
What changed
Preserve absolute frame coordinates when
GridLayoutapplies frame-based placements throughhs.layout.apply().options.absolute_x = trueandoptions.absolute_y = trueto normalized layout rows inhelpers.luatests/helpers_spec.luathat exercises a negative-x frame and asserts the absolute-coordinate options are presentWhy
Displays positioned left or above the primary display use negative global coordinates.
hs.layout.apply()interprets negative frame coordinates as offsets unless the row opts into absolute positioning.Without those options, a valid frame for a secondary display can be remapped onto the primary display instead of being applied where it belongs.
Validation
lua tests/helpers_spec.lualuac -p helpers.lua grid.lua tests/helpers_spec.lua