Skip to content

fix(desktop): restore maximized window dragged by the caption - #2746

Open
HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/windows-caption-drag
Open

fix(desktop): restore maximized window dragged by the caption#2746
HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/windows-caption-drag

Conversation

@HandSonic

Copy link
Copy Markdown
Contributor

Related issue

N/A — defect found by reviewing the #2711 desktop chrome series; described below.

Summary

Dragging the custom Windows title bar while the window is maximized kept calling setLocation against the maximized bounds: the window stayed pinned instead of following the pointer until the user restored it by double-clicking. The drag handler now clears MAXIMIZED_BOTH on the first drag event and re-anchors the window under the pointer at the same relative position (new pure restoredDragOrigin), matching native Windows behavior.

Affected surfaces

  • Frontend / Web
  • Backend / API / Storage
  • Database plugin / Driver
  • JCEF / Desktop packaging
  • CI / Build / Release
  • Documentation only

Verification

Risk and compatibility

  • Public API or stored data: N/A.
  • Database or driver compatibility: N/A.
  • Network, privacy, or security: N/A.
  • Community / Local / Pro boundary: Windows community chrome only.
  • Backward compatibility: non-maximized dragging unchanged (draggedWindowLocation untouched).

Reviewer map

  • Start here: BrowserWindowDragHandler.mouseDragged + restoredDragOrigin in WindowsCommunityWindowChrome.
  • Failure condition: if the frame size updates asynchronously after un-maximizing, the anchor degrades gracefully to the stale-size proportion.
  • Rollback or disable path: revert single commit.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: substantial — fix and tests drafted with AI assistance, verified locally.

Dragging the custom Windows title bar while the window is maximized kept
calling setLocation against the maximized bounds, so the window stayed
pinned instead of following the pointer until the user restored it by
double-clicking. The drag handler now clears MAXIMIZED_BOTH on the first
drag event and re-anchors the window under the pointer at the same
relative position, matching native Windows behavior.
@HandSonic
HandSonic requested review from a team and openai0229 as code owners August 23, 2026 18:55
@openai0229 openai0229 moved this to In Review in Chat2DB Community Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants