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

Windowed Fullscreen #749

Open
felipecrs opened this issue Mar 5, 2025 · 7 comments
Open

Windowed Fullscreen #749

felipecrs opened this issue Mar 5, 2025 · 7 comments

Comments

@felipecrs
Copy link

Hi,

I was wondering, wouldn't it be nice to have Windowed Fullscreen support?

This way I can move my cursor across monitors to other applications without having to minimize the game.

@bvschaik
Copy link
Owner

bvschaik commented Mar 6, 2025

Constraining the mouse to the window (using SDL_WindowGrab) was a deliberate choice: #51

@felipecrs
Copy link
Author

felipecrs commented Mar 6, 2025

That's when the game is in Exclusive Fullscreen mode. The same applies to most other games. I'm not asking to change that.

What I'm asking for is a Windowed Fullscreen mode, where the window decorations are hidden, and the window size matches the resolution of the display.

Then, in Windowed or Windowed Fullscreen it would not make sense to constrain the cursor (as it is currently not constrained when running in Windowed mode).

@felipecrs
Copy link
Author

felipecrs commented Mar 6, 2025

BTW Windowed Fullscreen is also known as Borderless Windowed.

@bvschaik
Copy link
Owner

bvschaik commented Mar 6, 2025

We're using SDL's SDL_WINDOW_FULLSCREEN_DESKTOP option:

if (0 != SDL_SetWindowFullscreen(SDL.window, SDL_WINDOW_FULLSCREEN_DESKTOP)) {

I'm not sure if that also counts as windowed fullscreen. SDL does not offer anything else besides true fullscreen at a specific resolution (causing desktop resizes), and this option. It does seem to have a borderless option that may do what you ask.

But technical details aside: how would the user tell the difference between true fullscreen and fullscreen without borders? And how would she switch between modes? Or move the window from one screen to another?

@felipecrs
Copy link
Author

I just realized that Augustus has this "feature". All you need to do is to NOT have Fullscreen ticked and then set Windowed resolution to your display resolution:

Image

So, maybe the cleanest and simplest way to solve this would be to add more resolution options (including display's) in the Video settings:

Image

@felipecrs
Copy link
Author

Or move the window from one screen to another?

Maybe using keyboard shortcuts like Windows + Arrow Left/Right, but I wouldn't worry about that. I have never seen a game that has implemented something to address this.

@bvschaik
Copy link
Owner

I tried some things out yesterday and today. Findings:

First, a borderless fully screen-covering window is ridiculously tricky to implement correctly for all platforms, especially considering things like notches.

Second, the current implementation already allows for using Alt+Tab to switch to any application on the second screen (tested on macOS and Windows 11). The only problem is that when you move the mouse over to another screen after Alt+Tab, the map keeps scrolling because we implemented a dirty workaround for a Windows 10 problem (#172). With knowledge gained from #439 I can now properly fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants