Skip to content

fix(window): stop disturbing exclusive fullscreen apps during mode switches - #245

Merged
FoOcean merged 2 commits into
masterfrom
fix/fullscreen-transition
Oct 16, 2026
Merged

FoOcean merged 2 commits into
masterfrom
fix/fullscreen-transition

Conversation

@FoOcean

@FoOcean FoOcean commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Pre-submission checklist

  • I have read CONTRIBUTING.md and completed the required checks
  • Local and CI checks pass
  • I have completed a self-review
  • I confirm that I haven't read the checkboxes and just ticked them all

Change type (select one)

  • feat New feature
  • fix Bug fix
  • docs Documentation or templates
  • style Formatting with no behavior change
  • refactor Code change that neither fixes a bug nor adds a feature
  • perf Performance improvement
  • test Test-related change
  • chore Build, CI, dependency, or tooling change
  • revert Revert
  • security Security fix

Scope (select all that apply)

  • Application core
  • UI style or layout
  • Application behavior
  • Dependency changes
  • Plugin API
  • CI/CD configuration
  • Documentation
  • Other (describe below)

Related issues


Description

Summary

Stops WinIsland from reordering or moving its topmost window while another app switches into exclusive fullscreen, and fixes the fullscreen detection flapping during resolution changes.

Motivation and context

User report (WinIsland 1.5.1, Windows 11 26200, RTX 5060 Laptop, 2560x1440): switching DARK SOULS III v1.12 from windowed to fullscreen made the desktop resolution flip 2560x1440 ↔ 1920x1080 several times, then the game window was minimized (process still running). It reproduced every time with WinIsland running, also with fullscreen_auto_hide = false, and never after quitting WinIsland.

During that switch WinIsland:

  • re-asserted HWND_TOPMOST and reapplied skip-taskbar every second (topmost_check), regardless of the auto-hide setting;
  • on a monitor size change, moved its window immediately and again 750 ms later (monitor_check), and snapped it back on every Moved event.

Reordering or moving a topmost window over a game that is acquiring exclusive fullscreen makes it lose the display; DS3 then minimizes itself as on Alt+Tab.

The user's log also showed Fullscreen state: active → normal within the same second. foreground_fullscreen required the foreground monitor's rect to equal the island's cached monitor rect, which is stale while the resolution changes.

Changes

  • DisplayProvider::exclusive_fullscreen_active reads SHQueryUserNotificationState() == QUNS_RUNNING_D3D_FULL_SCREEN.
  • update_display_transition (layout.rs) reports a transition while an app holds Direct3D exclusive fullscreen, or for 2.5 s after the target monitor's size or position changes. It is evaluated on the 1 s topmost tick and on Moved events.
  • Topmost enforcement is skipped during a transition. Borderless fullscreen apps keep the existing behaviour, so the island can still stay above them with auto-hide off.
  • A monitor change no longer moves the window immediately. The new position is stored and applied once after the display has been stable for 2.5 s and no exclusive fullscreen app is active. The Moved snap-back is suppressed during a transition.
  • apply_overlay_styles only calls set_skip_taskbar when the value changes.
  • foreground_fullscreen compares monitor identity (MonitorFromRect on the target) instead of exact rect equality.

Verified locally: cargo fmt --check, MSVC clippy -D warnings (with #244), release build. Not verified: the DS3 repro itself (game not available here); a test build was handed to the reporter.

UI changes

None.

🤖 Generated with Claude Code

FoOcean and others added 2 commits October 16, 2026 09:50
CI now runs clippy 1.99, which flags manual_is_multiple_of in timer_view.rs
and chunks_exact_to_as_chunks in recorder.rs, failing the PR Check job on
master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itches

DARK SOULS III minimized itself when switching to exclusive fullscreen while
WinIsland ran, even with fullscreen auto-hide off. Every second the overlay
re-asserted HWND_TOPMOST and reapplied skip-taskbar, and a display mode
change moved the window immediately and again 750 ms later, plus snapped it
back on every Moved event. Reordering or moving a topmost window during the
switch made the game lose its display.

Topmost enforcement now pauses while an app holds Direct3D exclusive
fullscreen (SHQueryUserNotificationState) and for 2.5 s after the target
display changes. The window moves once after the display settles and does
not snap back during the transition. Skip-taskbar is only reapplied when it
changes.

Fullscreen detection compared the foreground monitor against the island's
cached monitor rect, so it flipped between active and normal within the same
second while the resolution changed. It now compares monitor identity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@FoOcean
FoOcean merged commit 9a5f9d5 into master Oct 16, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Merge in Winisland Pull Requests Oct 16, 2026
@Eatgrapes
Eatgrapes deleted the fix/fullscreen-transition branch October 16, 2026 15:04
@FoOcean FoOcean mentioned this pull request Oct 19, 2026
5 of 22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant