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

[Windows] Fullscreen as borderless window at desktop resolution #4449

Closed
DorpsGek opened this issue Jan 29, 2011 · 17 comments
Closed

[Windows] Fullscreen as borderless window at desktop resolution #4449

DorpsGek opened this issue Jan 29, 2011 · 17 comments

Comments

@DorpsGek
Copy link

@DorpsGek DorpsGek commented Jan 29, 2011

ln opened the ticket and wrote:

Entering fullscreen on Windows makes you regret you ever clicked the button or pressed Alt-Enter.

The desktop resizes to something ridiculously small, and when that happens, the Windows taskbar on the bottom also resizes permanently. That means the program icons are limited to the first 640 horizontal pixels of the taskbar even after you exit the fullscreen. It is fixable, but not quite obvious how.

Also while in fullscreen, it is not possible to move the mouse cursor to the second screen on a multi-display configuration.

When you have an LCD screen with a physical native resolution of 1920x1080, or whatever above VGA, do you actually ever want to run OpenTTD at 640x480 in fullscreen? Or any resolution other than the one native to the screen?

Instead of changing the real screen resolution it would be much better to create a borderless window matching the desktop resolution, a window that would still cover the taskbar.

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/4449
@DorpsGek

This comment has been minimized.

Copy link
Author

@DorpsGek DorpsGek commented Jan 29, 2011

Rubidium wrote:

Sounds like OpenTTD's resolution was set to 640x480 when you told it to go to full screen (at that resolution).

In any case, there are many that play 800x600 on a 1600x1200 monitor or something similar to get larger graphics and I doubt we want to remove that possibility. Having this possibility does mean we can't use a borderless window; we have to change the actual resolution of the screen.

I think that starting OpenTTD maximized is rude to the player; any program that starts maximized annoys me enormously.

I don't think we can do much about the behaviour of Windows when we let the application go into full-screen (the messing up of stuff on the desktop and such are all done by Windows). I reckon all other applications that use Windows' full-screen functionality have the exact same issues. OpenTTD might even use the 8bpp hardware acceleration when in proper full-screen, although it might very well be that most recent drivers are lacking that possibility.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4449#comment9559
@DorpsGek

This comment has been minimized.

Copy link
Author

@DorpsGek DorpsGek commented Jan 29, 2011

ln wrote:

Yes, I am not saying messing up the desktop is an exclusively OpenTTD-specific problem, but there are some games that do this more nicely (probably by not touching the actual screen resolution). Civilization V Demo and Microsoft Flight Simulator to name a few.

Also I am not suggesting OpenTTD should be started maximized by default, but rather the "maximized" borderless window would replace the real fullscreen mode, and the regular windowed mode would work like before.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4449#comment9560
@DorpsGek

This comment has been minimized.

Copy link
Author

@DorpsGek DorpsGek commented Jun 6, 2015

minexew wrote:

Has there been any development on this?

Patches welcome?


This comment was imported from FlySpray: https://bugs.openttd.org/task/4449#comment13944
@DorpsGek

This comment has been minimized.

Copy link
Author

@DorpsGek DorpsGek commented Jun 6, 2015

minexew wrote:

Please have a look at the attached patch. (for convenient viewing: https://github.com/minexew/openttd-patches/blob/master/borderless_fullscreen/r27296_borderless_fullscreen.patch)

It changes the Win32 video driver in the following way: when a full-screen mode is requested, the current display resolution is checked and if it is identical to the requested fullscreen resolution, ChangeDisplaySettings is not used and a borderless fullscreen window is created instead. This doesn't break the use-case of intentionally using low-resolution fullscreen.
I've tested it on a multi-monitor setup and everything seems to work as before, except you can now switch to other windows without the screen flashing and mouse cursor flying all over the place.

As for the 8bpp hardware acceleration, has that ever worked?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4449#comment13945
@DorpsGek

This comment has been minimized.

Copy link
Author

@DorpsGek DorpsGek commented Jul 26, 2015

ln wrote:

Great, with the patch the fullscreen mode works as I hoped!

Two things to improve though:
* Remember the initial resolution of the windowed mode and change back to that when exiting fullscreen.
* Use the location of the window to determine which display should be used for fullscreen mode -- right now it's always the primary display.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4449#comment14018
@andythenorth

This comment has been minimized.

Copy link
Contributor

@andythenorth andythenorth commented Apr 13, 2018

From IRC 13th April 2018

andythenorth: ln: is this still? #4449
[10:34am] ln: andythenorth: unless the patch by minexew has been applied since, i assume it still is. though i haven't tried ottd in a while, especially not in fullscreen.

@PeterN

This comment has been minimized.

Copy link
Member

@PeterN PeterN commented Apr 13, 2018

Might be worth switching from fullscreen toggle to a tristate like many games have these days: Windowed, Borderless Window, Fullscreen.

Bonus if it can be implemented on other systems too.

@lanurmi

This comment has been minimized.

Copy link

@lanurmi lanurmi commented Jun 13, 2018

@PeterN Is the real fullscreen mode even relevant or practically possible on other systems of today?

@PeterN

This comment has been minimized.

Copy link
Member

@PeterN PeterN commented Jun 19, 2018

Yes it is.

@lanurmi

This comment has been minimized.

Copy link

@lanurmi lanurmi commented Jun 19, 2018

@PeterN Thank you for your verbose answer. Can we agree that implementing your proposed bonus stuff for other systems is out of scope of this issue?

@lanurmi

This comment has been minimized.

Copy link

@lanurmi lanurmi commented Jun 19, 2018

@PeterN How does one operate a tri-state fullscreen toggle by pressing Alt-Enter?

@lanurmi

This comment has been minimized.

Copy link

@lanurmi lanurmi commented Jul 10, 2018

FYI, I am not going to waste my free time learning how to add a tristate toggle to settings, as this PR is never going to get merged anyway. From my point of view this PR is complete, and I am not going to touch it anymore. If others wish to improve it further, be my guest.

@TrueBrain

This comment has been minimized.

Copy link
Member

@TrueBrain TrueBrain commented Jul 19, 2018

Well, seems some wires got crossed here. Some comments in the issue, some in the PR (#6794). That is not helpful :D

All modern games have a tri-state, and for good reason. Depending on your setup, borderless or fullscreen can be preferred. Adding a tri-state should be easy for us, via the settings menu. Alt+enter should always switch to fullscreen (not to borderless); and in the settings where you configure the resolution you should be able to set: borderless. This of course also locks the resolution.

One weird thing about OpenTTD that always annoyed me: fullscreen goes to the current configured resolution, instead of the native. But that might be something for another issue to pick up :)

The current PR (#6794) changes fullscreen into borderless. I think this is the wrong approach, as it removes fullscreen for those who do want it. In other words, it would be a regression for them. So adding a tri-state seems the only good solution for this issue.

@nielsmh

This comment has been minimized.

Copy link
Contributor

@nielsmh nielsmh commented Jul 19, 2018

I would suggest going a step further than having a tri-state, and instead have each video driver be queryable about possible display modes, and offer a menu of all driver+mode combinations. E.g. you could get options Windowed (Win32), Borderless (Win32), Fullscreen (Win32), Windowed (SDL), Fullscreen (SDL), etc.

@andythenorth andythenorth added the stale label Jan 5, 2019
@andythenorth

This comment has been minimized.

Copy link
Contributor

@andythenorth andythenorth commented Jan 9, 2019

Thanks for this. There's been no activity on this for some time, and as it stands, it doesn't look likely that it will go any further. I'm closing it as we try to keep the issue count low for OpenTTD, it helps us focus on things that are important and fun. Feel free to discuss in irc or request re-opening if you disagree. Thanks for contributing!

@lanurmi

This comment has been minimized.

Copy link

@lanurmi lanurmi commented Jan 9, 2019

Yes, OpenTTD fullscreen permanently resizing your desktop certainly isn't fun, so makes sense not to focus on this one.

@OpenTTD OpenTTD locked and limited conversation to collaborators Jan 9, 2019
@andythenorth

This comment has been minimized.

Copy link
Contributor

@andythenorth andythenorth commented Jan 9, 2019

Locked, life is too short for arguing about boring things.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.