Details

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.

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.

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.

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.

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.