Skip to content

fix(desktop): restore maximized Windows windows by dragging the title bar - #3991

Merged
kev1n77 merged 2 commits into
openBitFun:mainfrom
uiharuayako:codex/fix-windows-titlebar-drag-restore
Nov 19, 2026
Merged

kev1n77 merged 2 commits into
openBitFun:mainfrom
uiharuayako:codex/fix-windows-titlebar-drag-restore

Conversation

@uiharuayako

Copy link
Copy Markdown
Contributor

Summary

  • Allow Windows users to restore a maximized Desktop window by dragging blank title-bar space, using the existing native caption drag operation.
  • Apply the same rule during startup. Keep F11 fullscreen excluded and retain the hit targets that reserve tabs, close buttons, and other controls for their own interactions.
  • Add regression coverage for the runtime and startup paths, including maximized main and panel tab targets.

Motivation

The shared drag guard introduced in #3234 stopped all window dragging while maximized. Windows normally restores and moves a maximized window during a caption drag. This restores that gesture for Windows while keeping the tab hit-target fix from #3075.

Verification

  • pnpm --dir src/web-ui run test:run src/app/components/SceneTopBar/SceneTopBar.test.tsx src/app/startup/startupPreload.test.ts src/infrastructure/runtime/environment.test.ts src/infrastructure/runtime/window.test.ts passed all 75 tests. Five of the new assertions failed against the old guard. The tests cover maximized and fullscreen states, startup, and main and panel tab hit targets.
  • pnpm run check:web and git diff --check passed.
  • On Windows 11 build 26100.9711, a disposable WebView2 fixture using the production window configuration and pinned Tauri/Tao restored its original 656 × 489 window size after a title-bar mouse drag. While the button was still held, another pointer movement moved the window by 132 × 60 pixels. Windows drag-from-maximize was enabled.
  • The native check exercised a dedicated fixture. The complete packaged Desktop app and live remote scenarios were not exercised.

AI-assisted change with independent regression and review.

@uiharuayako

Copy link
Copy Markdown
Contributor Author

我认为这是修正标题栏误触时额外引入的一处 Windows 交互回归,值得修复。相关改动的时间线比较清楚。

这次修复让 Windows 最大化窗口的标题栏空白区重新走原生拖动。Windows 11 的 WebView2 测试窗口实测恢复到原尺寸,鼠标按住时仍能继续跟随。回归测试也覆盖了 F11 全屏继续禁止拖动,以及操作标签页时不会拖走整个窗口。

Refresh the startup maximize state on resize and stop syncing during the startup handoff. Cover the delayed state change from a native caption drag.

AI-assisted. Verified with 150 focused Web UI tests.
@kev1n77
kev1n77 merged commit 3072063 into openBitFun:main Nov 19, 2026
9 checks passed
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