Skip to content

Fix window positioning issue when tiling maximized windows from popup#425

Closed
kyledross wants to merge 2 commits intoubuntu:mainfrom
kyledross:fix-popup-window-positioning
Closed

Fix window positioning issue when tiling maximized windows from popup#425
kyledross wants to merge 2 commits intoubuntu:mainfrom
kyledross:fix-popup-window-positioning

Conversation

@kyledross
Copy link
Copy Markdown

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.

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.
@kyledross kyledross closed this Nov 24, 2025
@kyledross kyledross deleted the fix-popup-window-positioning branch November 24, 2025 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant