Repository navigation
Editor: fix window jiggle while moving, add edge/corner resizing - #1
Merged
ZeroDay-Labz merged 2 commits intoOct 19, 2026
Merged
Conversation
The Editor viewport builder was rebuilt every frame from settings.editor_window_rect, which is itself updated every frame from the window's current outer rect. egui turns any change in a viewport's builder into OuterPosition/InnerSize commands, so during a drag the window was repeatedly sent back to the position it had a frame earlier and visibly jiggled (seen on Windows). Compute the geometry once when the Editor viewport opens and keep the builder constant while it is shown. The remembered rect is still saved and used the next time the Editor opens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Editor is undecorated, so the window manager gives it no resize border (on Windows it could not be resized at all). Add thin strips along the edges and corners that show a resize cursor and hand a drag to the window manager with ViewportCommand::BeginResize. They are off while the window is maximized or fullscreen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Two fixes for the Editor window in windowed (non-maximized) mode, found on Windows.
1. The window jiggles while it is dragged or resized
App::updaterebuilt the Editor'sViewportBuilderevery frame fromsettings.editor_window_rect, and that rect is updated every frame from the window's current outer rect. egui turns any change in a viewport's builder intoOuterPosition/InnerSizecommands. During a drag, the window was therefore sent back to where it had been a frame earlier, over and over, and it jiggled across the screen.Fix: compute the geometry once when the Editor viewport opens (
editor_open_geometry) and keep the builder constant while the Editor is shown. The remembered rect is still saved every frame and used the next time the Editor opens.2. The window can't be resized from its edges
The Editor is created with
with_decorations(false), so the window manager gives it no resize border. On Windows it couldn't be resized at all.Fix:
resize_edgesadds 5 px strips along the edges and 12 px corner squares. They show the matching resize cursor and pass a drag to the window manager withViewportCommand::BeginResize. They're added last in the panel so they win the hit test, and they're off while the window is maximized or fullscreen.Testing
packaging/build-windows.sh. There are no new compiler warnings.BeginResizeuses the compositor's interactive resize there.🤖 Generated with Claude Code