Skip to content

Windows: fold the notch over full-screen apps, and keep it on the screen's edge - #403

Open
RawJat wants to merge 5 commits into
vinzdg:mainfrom
RawJat:feat/windows-fullscreen-fold
Open

RawJat wants to merge 5 commits into
vinzdg:mainfrom
RawJat:feat/windows-fullscreen-fold

Conversation

@RawJat

@RawJat RawJat commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

A full-screen video, game or slideshow had the notch open over it, and the topmost watchdog (#322) put it back on top. On the taskbar's edge it also floated a taskbar's height above the bottom of the screen, over the picture: placement uses the work area, and Windows leaves that as it was when a full-screen app sends the taskbar away.

What changes

  • Full screen is judged as on the Mac (FullScreenDetector): the foreground window fills its monitor to within 4 px, polled every 400 ms so a video going full screen in the browser already in front is caught too. A maximised window does not count, even with an auto-hidden taskbar (the Mac's Add a "Fold for full-screen apps" toggle #181), nor does the desktop.
  • On the notch's own screen it folds to the pill at once, whatever Show says. Hovering the pill still opens it, and leaving the app unfolds it again.
  • Meanwhile the notch sits on the monitor's own edge, fold or not. It glides there over the fold's 360 ms on the same curve, a step per composited frame, so the pill folds and reaches the edge together, and rises the same way when the taskbar returns.
  • Appearance → Fold for full-screen apps, on by default, with the Mac's caption and its catalog wording; pt-BR and ru are ours. The README describes it.

Overlap: #375 and #390 (mine, still open) change neighbouring lines in settings.html, notch.html and main.rs. Whichever lands second adds foldFullScreen.refresh() to #375's first list and keeps fullScreen in #390's foldAllowed; I'll do that rebase.

Tests

  • cargo test (153), cargo clippy --all-targets (no new warnings), the page check
  • Live: YouTube full screen with the notch on the bottom, right and top edges; a game; a slideshow; Alt+Tab out and back; the switch off

A full-screen video, game or slideshow had the notch open over it, and
on the taskbar's edge floating a taskbar's height up, since Windows
keeps the work area as it was when the taskbar steps aside.

Now a foreground window filling the notch's monitor folds it to the
pill, as on the Mac; hovering still opens it. Meanwhile the notch sits
on the monitor's own edge, gliding there over the fold's 360 ms rather
than jumping. Appearance gains the Mac's Fold for full-screen apps
switch, on by default.
@RawJat
RawJat requested a review from vinzdg as a code owner September 29, 2026 20:16
vinzdg#375 gathered Settings' first reads into one list that the window waits
on before it shows, so the fold switch's read joins that list instead of
running after it. main.rs takes vinzdg#388's carry module beside this one.
@RawJat

RawJat commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Merged main in to fix the conflicts with #375 and #388. The fold switch now loads with the rest of Settings, and main.rs keeps the carry module next to the full-screen one. The PR's own changes are the same as before.

This PR and #390 edit some of the same lines, so whichever you merge second, I'll merge main into the other again.

The full-screen poll asked Tauri for the notch's HWND on every
platform, and `hwnd()` exists only on Windows, so the Linux build
from vinzdg#294 stopped there. The lookup moves into the Windows `read`,
and the helpers only that `read` uses are marked as diag.rs marks its
own, so Linux builds without new dead-code warnings.
vinzdg#390 retired the move handle and gave the fold the settings button's
order: the disc turns back into its arc, the arc goes home, then the
notch folds. A full-screen app now joins that as a second reason to
fold, and its immediate fold cancels the arc's pending tuck as well as
the fold timer. The full-screen commands stay in the handler list
without the drop zones', and the Settings switch without the handle's.
@RawJat

RawJat commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

I fixed the merge conflicts I had with #390 . this is good to go. @vinzdg

vinzdg#394 added Settings' two reset-notification switches at the same three
places this branch adds the fold switch: where each is declared, drawn
and first read. All three keep both.
@RawJat

RawJat commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

@vinzdg this has been ready before each of the last three rounds, but each time a lower-numbered PR touching the same files went in just ahead of it (#388, then #390, then #394), so it was in conflict by its turn. It's merged with main again and clean now. Could you take it first next round? If you'd like anything changed, tell me and I'll do it.

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