Fix window positioning issue when tiling maximized windows from popup#425
Closed
kyledross wants to merge 2 commits intoubuntu:mainfrom
Closed
Fix window positioning issue when tiling maximized windows from popup#425kyledross wants to merge 2 commits intoubuntu:mainfrom
kyledross wants to merge 2 commits intoubuntu:mainfrom
Conversation
When a maximized window is selected from the tiling popup, it would be resized correctly but positioned in the center of the screen instead of the intended edge location. This occurred both when windows were on the same workspace and across different workspaces. The issue is caused by a timing problem when the tile() function unmaximizes a window - the window actor's position isn't updated before move_resize_frame() tries to position it. Solution: - Detect when a window is maximized or changing workspaces - Add a brief delay (100ms) before tiling to allow state transitions - After tiling, verify the window position using the size-changed signal - Correct the position if needed using move_frame() - Include a 200ms fallback timeout in case the signal doesn't fire This ensures windows are positioned correctly regardless of their initial state or workspace location.
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 a maximized window is selected from the tiling popup, it would be
resized correctly but positioned in the center of the screen instead of
the intended edge location. This occurred both when windows were on the
same workspace and across different workspaces.
The issue is caused by a timing problem when the tile() function
unmaximizes a window - the window actor's position isn't updated before
move_resize_frame() tries to position it.
Solution:
This ensures windows are positioned correctly regardless of their initial
state or workspace location.