fix: move-window top/bottom/center ignore working area offset#778
Open
Noethix55555 wants to merge 1 commit into
Open
fix: move-window top/bottom/center ignore working area offset#778Noethix55555 wants to merge 1 commit into
Noethix55555 wants to merge 1 commit into
Conversation
top used absolute y=0 instead of workingArea.Top; bottom used workingArea.Height-Height instead of workingArea.Bottom-Height; center used screen.Bounds instead of workingArea. All three misplace the window when a taskbar is present or on non-primary monitors where the working area Y origin is non-zero.
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.
GuiCommand_MoveWindowsnaps windows to screen edges using the working area, buttop,bottom, andcenterall ignore the working area's position offset.topsetsTop = 0(raw screen y=0) instead ofworkingArea.TopbottomsetsTop = workingArea.Height - Heightinstead ofworkingArea.Bottom - Heightcenterusesscreen.Boundsinstead ofworkingArea, so it can center under the taskbarleftandrightcorrectly addworkingArea.Left, sotopandbottomare inconsistent. On the primary monitor with a bottom taskbar the error equals the taskbar height; on a non-primary monitor or with a top taskbar the window is placed off-screen.Fix: use
workingArea.Top/workingArea.Bottom/workingAreaconsistently for all four directions and for center.