Skip to content

Windows: the Coucou window opens and closes with Windows' own motion - #898

Open
ZouaouiB wants to merge 1 commit into
Louis-CFM:mainfrom
ZouaouiB:feat/hub-window-motion
Open

ZouaouiB wants to merge 1 commit into
Louis-CFM:mainfrom
ZouaouiB:feat/hub-window-motion

Conversation

@ZouaouiB

Copy link
Copy Markdown
Contributor

The Coucou window is created hidden and only shown and hidden afterwards, so opening it (Settings in the island, the tray, the Start menu) and closing it have no animation: it pops in and out. This gives it Windows' own motion.

Changes (Windows)

  • hub_motion.rs (new): the window rises out of its taskbar button and folds back into it — the system's minimise/restore animation. To open: shown minimised (the button comes back), then restored 60 ms later. To close: minimised, then hidden once the fold is over (400 ms), which takes the button off the taskbar as before. Reopened during the fold, the pending hide is dropped; a click on the taskbar button during the fold leaves the window open.
  • Nothing is drawn by the page, and Windows' Animation effects setting turns it off like for any other window. Linux keeps the plain hide and show.
  • lib.rs: show_hub() and the close handler call hub_motion::open() / close().

Validation

  • cargo test --workspace --locked: 516 passed, 4 ignored + 30 (hook). git diff --check: passed.
  • Built and run on Windows 11. I couldn't record a GIF from my setup; I can add one if you'd like to see it first.

To know: the taskbar button appears ~60 ms before the window rises (that is what the motion starts from), and opening takes a little longer than an instant show.

I know CLAUDE.md says existing views stay as they ship unless you ask, so this one is entirely your call — happy to adjust it, or to close it if it isn't the direction you want.

The Coucou window is created hidden and only shown and hidden afterwards,
so opening it (Settings in the island, the tray, the Start menu) and
closing it had no animation: it popped in and out.

It now rises out of its taskbar button and folds back into it, the system's
minimise/restore animation. To open, it is shown minimised (the button comes
back), then restored 60 ms later; to close, it is minimised, then hidden once
the fold is over (400 ms), which takes the button off the taskbar as before.
Reopened during the fold, the pending hide is dropped. Nothing is drawn by
the page, and Windows' Animation effects setting turns it off like for any
other window. Linux keeps the plain hide and show.

All in hub_motion.rs; show_hub() and the close handler call open() and close().

This branch has not been deployed

No deployments
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.

1 participant