Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add osu! setting to control automatic minimising on focus loss in fullscreen mode #26166

Merged
merged 6 commits into from
Jan 15, 2024

Conversation

Susko3
Copy link
Member

@Susko3 Susko3 commented Dec 27, 2023

Depends on:

Adds the osu!-side setting to control FrameworkSetting.MinimiseOnFocusLossInFullscreen

  • should equivalent to stable "Minimise on alt-tab during fullscreen"
  • the setting checkbox is only visible when in fullscreen mode (some report that the SDL hint also affects borderless on linux - I've decided to ignore that)

ConfineMouseTracker is updated to only override OsuSetting.ConfineMouseMode when clicking outside the window would minimise the window

  • i.e. when in fullscreen and MinimiseOnFocusLossInFullscreen == true
  • those who disable MinimiseOnFocusLossInFullscreen are likely to use multiple monitors and allowing the cursor to leave the window makes sense for that use case
  • if confining is desired, the user can set ConfineMouseMode to Always
  • the relevant setting is updated to reflect that, but I've decided to leave the tooltip as "Not applicable in full screen mode"

I can add tests for this to ConfineMouseTrackerTest, but I don't see much benefit as it's just testing the very basic ConfineMouseTracker logic.

Shown only on desktop platforms in fullscreen.
"alt-tab" keyword also matches "alt" and "tab".
…racker` logic

Not too happy with the duplicated logic, but settings can't depend on `ConfineMouseTracker`
for testability reasons.
@peppy peppy merged commit ed89f64 into ppy:master Jan 15, 2024
15 of 17 checks passed
@Susko3 Susko3 deleted the add-minimise-on-focus-loss-setting branch January 15, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants