Skip to content

Editor: fix window jiggle while moving, add edge/corner resizing - #1

Merged
ZeroDay-Labz merged 2 commits into
ZeroDay-Labz:mainfrom
plexscript:fix/editor-window-move-resize
Oct 19, 2026
Merged

ZeroDay-Labz merged 2 commits into
ZeroDay-Labz:mainfrom
plexscript:fix/editor-window-move-resize

Conversation

@plexscript

@plexscript plexscript commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

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::update rebuilt the Editor's ViewportBuilder every frame from settings.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 into OuterPosition / InnerSize commands. 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_edges adds 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 with ViewportCommand::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

  • Cross-built the single-file Windows exe with packaging/build-windows.sh. There are no new compiler warnings.
  • Windows: the jiggle is gone when dragging the Editor.
  • The edge/corner resizing has been built but not yet tested by hand on Windows.
  • Not tested on Linux. On Wayland the builder never sets a position, so fix 1 only changes how the size is handled there. BeginResize uses the compositor's interactive resize there.

🤖 Generated with Claude Code

plexscript and others added 2 commits October 19, 2026 12:57
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>
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.

2 participants