feat(window): live resize neighboring tiled windows during mouse drag#512
Open
AbdulMateenzwl wants to merge 1 commit intoforge-ext:mainfrom
Open
feat(window): live resize neighboring tiled windows during mouse drag#512AbdulMateenzwl wants to merge 1 commit intoforge-ext:mainfrom
AbdulMateenzwl wants to merge 1 commit intoforge-ext:mainfrom
Conversation
Previously, neighboring tiled windows would only update their position and size after the mouse button was released, causing a jarring snap effect at the end of every resize operation. On Wayland, Mutter suppresses size-changed and position-changed signals during active grab operations, so the existing _handleResizing logic never fired during the drag. Additionally, this.move() exits early when metaWindow.grabbed is true, blocking any neighbor repositioning. Fix by introducing a GLib.timeout_add polling loop (~60fps) that starts on grab-op-begin for resize grabs and stops on grab-op-end: - Each tick calls _handleResizing to recalculate sibling percentages - initRect is updated per-tick so deltas are frame-relative, preventing percent accumulation across ticks - Neighbors are moved via move_resize_frame directly, bypassing the grabbed guard in this.move() - A lastWidth/lastHeight guard skips processing when the window size has not changed, also preventing double-processing on X11 where signals still fire during grabs - Only the affected container subtree is reprocessed via processNode, not the entire tree Tested on Wayland (GNOME 49) and confirmed working on X11. Closes forge-ext#511
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.
Previously, neighboring tiled windows would only update their position and size after the mouse button was released, causing a jarring snap effect at the end of every resize operation.
On Wayland, Mutter suppresses size-changed and position-changed signals during active grab operations, so the existing _handleResizing logic never fired during the drag. Additionally, this.move() exits early when metaWindow.grabbed is true, blocking any neighbor repositioning.
Fix by introducing a GLib.timeout_add polling loop (~60fps) that starts on grab-op-begin for resize grabs and stops on grab-op-end:
Tested on Wayland (GNOME 49) and confirmed working on X11.
Closes #511