Skip to content

fix(window): restore maximized state and isolate titlebar controls from drag region - #209

Open
pitangainnovare wants to merge 6 commits into
lullabyX:masterfrom
pitangainnovare:fix/window-maximize-and-state
Open

pitangainnovare wants to merge 6 commits into
lullabyX:masterfrom
pitangainnovare:fix/window-maximize-and-state

Conversation

@pitangainnovare

@pitangainnovare pitangainnovare commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Restore maximized window state (src-tauri/src/lib.rs): tauri_plugin_window_state was initialized without StateFlags::MAXIMIZED, preventing the maximized state from being saved and restored across sessions. Added StateFlags::MAXIMIZED to with_state_flags.
  • TitleBar window control responsiveness (src/components/TitleBar.tsx): Removed data-tauri-drag-region from the root titlebar wrapper to prevent WebKitGTK / GTK on Linux (especially Wayland) from capturing clicks on window buttons as window move drags. Added stopPropagation on mouse down and click events for the minimize, maximize/restore, and close buttons.
  • Tests (src/components/TitleBar.test.tsx): Added unit tests covering window control interactions and drag-region isolation.

Closes #183

@pitangainnovare pitangainnovare changed the title fix(window): restore maximized state and isolate titlebar button drag region fix(ui, window): restore maximized state, isolate titlebar drag region, and harmonize theme tokens Sep 1, 2026
@pitangainnovare
pitangainnovare force-pushed the fix/window-maximize-and-state branch from b25c665 to f62b1f3 Compare September 1, 2026 19:20
@pitangainnovare pitangainnovare changed the title fix(ui, window): restore maximized state, isolate titlebar drag region, and harmonize theme tokens fix(window): restore maximized state and isolate titlebar controls from drag region Sep 1, 2026
@MikeCamel

Copy link
Copy Markdown

Is this also expected to fix #187 and/or #189?

@MikeCamel

Copy link
Copy Markdown

Is this also expected to fix #187 and/or #189?

Having taken the patches, this does seem to fix #187 and #189 for me.

@MikeCamel

Copy link
Copy Markdown

Also fixes #183 as advertised.

@pitangainnovare

Copy link
Copy Markdown
Contributor Author

Also fixes #183 as advertised.

To clarify: PR #209 specifically addresses #183 (persisting and restoring window maximized state across sessions) and titlebar button event isolation on Linux.

Issues #187 (scroll state restoration) and #189 (scrollbar clickability and arrow key scrolling) were actually resolved in master via earlier commits (2e19854, b5d7049, d5913a3, and 1a6969b). Because there has been no new tagged release since v0.21.0, those fixes were not yet available in Flatpak/binary packages, which is why testing this branch (built on top of recent master) resolved them for you!

@MikeCamel

Copy link
Copy Markdown

Apologies! This makes perfect sense. I should have checked previous commits. Glad they're all fixed, though.

@MikeCamel

Copy link
Copy Markdown

Should #187 and #189 have been marked fixed by the previous changes, however?

@pitangainnovare

Copy link
Copy Markdown
Contributor Author

Should #187 and #189 have been marked fixed by the previous changes, however?

Yes, both issues should now be marked as fixed in master.

#189 was addressed by the scrollbar/resize-edge and keyboard-focus changes:

#187 was implemented across the scroll-restoration series, starting with f0afaff and later hardened for asynchronous and paginated lists through a358002.

These changes were authored by @lullabyX. I also tested the current branch locally on Ubuntu 26.04.1 LTS, running Linux 7.0 on x86_64, and both issues appear to be resolved.

These issues were not fixed by PR #209 itself. Testing that branch simply included the newer changes already present in master.

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.

[Bug] Window size is not remembered

2 participants