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

Fullscreen mode in MacOSX is almost unusable #8038

Closed
giordy opened this issue Mar 19, 2020 · 14 comments
Closed

Fullscreen mode in MacOSX is almost unusable #8038

giordy opened this issue Mar 19, 2020 · 14 comments

Comments

@giordy
Copy link

@giordy giordy commented Mar 19, 2020

Version of OpenTTD

1.9.3

Expected result

If the game is set to fullscreen, the underlying OS should not get into the way while playing

Actual result

If I get too close to the upper or the lower border of the game view while being full screen, the menubar and the dock of MacOSX often get into the way making it very difficult and painful to play. Here is a short video showing why it is so annoying.

I'm using MacOS 10.15.3

Note: OpenRCT2 has a fullscreen mode that doesn't suffer from this problem (if it can be useful).

Steps to reproduce

  1. start OpenTTD on MacOSX
  2. set it to fullscreen
  3. reach the top or the bottom border of the screen
@andythenorth
Copy link
Contributor

@andythenorth andythenorth commented Mar 19, 2020

I've repro-ed on 10.14.6

I had a look at what other macOS apps do.

Menubar

  • some apps (including some Apple apps) do same as OpenTTD: the menubar shows over the app UI chrome
  • some apps are menu-bar aware: I've seen 2 strategies, I think they're doing the following
    • force a redraw of the app UI below the global menubar (looks like they simply reduce the height of the canvas the app is drawn on, but this is a guess)
    • provide an explicit layout of the app's toolbars which is used when global menubar is visible

We would want to force a redraw below the global menubar.

For the dock, it's simple. The full-screen apps I tried tended to simply suppress the dock. This conflicts with Apple advice, but eh, that's the go. https://developer.apple.com/design/human-interface-guidelines/macos/app-architecture/fullscreen-mode/

Note that macOS dock has an 'always visible' or 'hide/show on hover' option. In either case full-screen apps tend to suppress the dock entirely.

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Apr 29, 2020

I think the best solution would be:

  • Push the game toolbar down when the menu bar pops up, but don't change the game screen size. The landscape or any other in-game windows should not move around due to the menu bar appearing.
  • Suppress the dock. Assume users on macOS knows of either keyboard shortcuts or mouse touch gestures to invoke application switching.
@giordy
Copy link
Author

@giordy giordy commented Apr 30, 2020

Push the game toolbar down when the menu bar pops up

I respectfully disagree, I think that when in fullscreen mode the underlying OS should never be able to interrupt the "immersed" experience. I would recommend that the MacOS menu bar were not allowed to pop up at all while playing: it causes a very stressful and frustrating gaming experience.

@BastianInuk
Copy link

@BastianInuk BastianInuk commented May 10, 2020

Push the game toolbar down when the menu bar pops up,

Does SDL have something like autolayout? I'd love to take a swing at this as my first issue!

I respectfully disagree, I think that when in fullscreen mode the underlying OS should never be able to interrupt the "immersed" experience.

I understand what you're communicating, but Apple users wants stuff to feel native. Of course there are outliers out there, but I think pushing the game toolbar would be what feels the most apple like, and would maybe not even be intrusive?

@giordy
Copy link
Author

@giordy giordy commented May 11, 2020

I understand what you're communicating, but Apple users wants stuff to feel native. Of course there are outliers out there, but I think pushing the game toolbar would be what feels the most apple like, and would maybe not even be intrusive?

I'm sorry but I have to insist on my point of view because I believe that the proposed solution is not really solving the problem. In my opinion it would be a major mistake to have the toolbar to move around just because you reach the edge of the screen with the mouse.

Unless I misunderstood something about the proposed solution, the resulting behavior would not be significantly different from the one I linked in the video, with the only change that instead of the toolbar being hidden by the MacOS UI it would be moved downwards. So instead of being frustrated by reason A a player would get frustrated by reason B. And the toolbar is what one uses 3/4 of the time spent playing.

I tried to install https://play0ad.com/ and their full screen mode doesn't allow MacOS to interfere.
I installed Steam (I don't usually keep it on this PC) and in the games I tried, MacOS was never allowed to break the immersed experience.
As I mentioned OpenRCT2 doesn't allow this either.
In my experience, not breaking fullscreen in a game is the norm, not the exception.

Not to mention that this setting: Pan window when mouse is at the edge in OpenTTD would remain broken for MacOS users.

I hope I'm giving you enough evidence that there is a reason why everybody is doing like this; OpenTTD is a game and not a standard application where edges are not so important.

@andythenorth
Copy link
Contributor

@andythenorth andythenorth commented May 11, 2020

Apple guidelines for full-screen don't mandate the OS menu bar behaviour, but they mandate dock behaviour (allow show unless it's immersive, e.g. game), and we can infer from that. https://developer.apple.com/design/human-interface-guidelines/macos/app-architecture/fullscreen-mode/

TL;DR I see no problem with hiding the OS menu bar in full-screen.

I play other Mac games that hide the menu bar permanently or only show it in certain circumstances.

Aside
We will then get feature requests from Mac users who desperately need to see their battery status and can't in full-screen. I was playing Warcraft 1 in full-screen DOSBox yesterday and ran the Mac out of power and into an un-announced shutdown.

@giordy
Copy link
Author

@giordy giordy commented May 11, 2020

In my opinion if one is concerned about battery status, he can play in windowed mode or quickly switch from full screen to windowed mode using Cmd + Enter. I see this annoyance as far inferior and more bearable than having to hunt down the toolbar every time you forget to not move the cursor too close to the edge.

@pavloant
Copy link

@pavloant pavloant commented Jun 12, 2020

I'm not sure if you've already solved the issue but here's what I've done:

  1. Right-click on OpenTTD
  2. Show package contents
  3. Edit the file named Info.plist (it's inside that Content folder)
  4. Add these two lines:
    < key >LSUIPresentationMode</ key >
    < integer >3< /integer >
  5. Save, close and run the game again, voilà!

If you still have problems, here's a video that helped me out with OpenTTD and some other games like Pillars of Eternity. Hope that helps!

https://www.youtube.com/watch?v=4KjyVrsXzss&t

@giordy
Copy link
Author

@giordy giordy commented Jan 23, 2021

Hi guys,

first of all thank you for the work you're doing, the game is every day more awesome :)

Tonight I tested OpenTTD 1.11.0-beta1 to see if the issue is solved, however I think it still needs some refinement.
I'm running MacOS Big Sur 11.1 and on the positive side the top bar doesn't appear anymore.
However:

  • The dockbar still appears
  • When reaching the top edge of the screen, close to the OpenTTD toolbar, the mouse cursor freezes for 1-2 seconds

I recorded a video displaying the issues.
Please let me know if you needed extra information or some other test to tackle the issue.

openttd-fullscreen.mp4
@LordAro LordAro reopened this Jan 23, 2021
@andythenorth
Copy link
Contributor

@andythenorth andythenorth commented Jan 23, 2021

  • When reaching the top edge of the screen, close to the OpenTTD toolbar, the mouse cursor freezes for 1-2 seconds

See also my report of same (item 2 in linked issue) #8486 (comment)

@andythenorth
Copy link
Contributor

@andythenorth andythenorth commented Feb 22, 2021

Issues resolved by recent Mac video changes.

@giordy
Copy link
Author

@giordy giordy commented Mar 1, 2021

In version 1.11.0-beta2 the behavior is improved but not perfect yet:

  • The top toolbar doesn't appear and the mouse works fluidly 👍🏻
  • Unfortunately the dockbar still appears.

Here a demo video:

fullscreen.mp4
@orudge
Copy link
Contributor

@orudge orudge commented Mar 1, 2021

* Unfortunately the dockbar still appears.

This should be fixed in tomorrow's nightly (20210302 or later).

@giordy
Copy link
Author

@giordy giordy commented Mar 3, 2021

@orudge I tested the nightly and I confirm that this is fixed now, thanks! :)

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

Successfully merging a pull request may close this issue.

8 participants