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

darwin: Fix uiWindow fullscreen/borderless/resize interaction. #194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

szanni
Copy link
Contributor

@szanni szanni commented Apr 8, 2023

  • Move window display settings to a separate function updateStyleMask().
  • Determine full screen by querying the window styleMask.

Fix:

  • Window not going into fullscreen when borderless.
  • Window not retaining not resizeable when toggling borderless.
  • Window not going into fullscreen when not resizeable.

Fixes #190 for me.

Two things to mention:

  1. Transitioning from borderless to fullscreen will set borders before transitioning into fullscreen which is visible on my system for a split second. I did not find any way around this.
  2. Resize is kept enabled in fullscreen, so that the user can exit fullscreen via the window controls. Querying uiWindowResizeable() will still return false and the correct state is restored when exiting fullscreen.

- Move window display settings to a separate function updateStyleMask().
- Determine full screen by querying the window styleMask.

Fix:
- Window not going into fullscreen when borderless.
- Window not retaining not resizeable when toggling borderless.
- Window not going into fullscreen when not resizeable.
@szanni szanni force-pushed the darwin-fix-uiWindow-fullscreen-borderless-resize branch from a785edc to 0a39bf4 Compare April 10, 2023 01:21
@szanni
Copy link
Contributor Author

szanni commented Apr 10, 2023

Updated updateStyleMask() to be static and used cast to BOOL instead of !!.

@cody271
Copy link
Contributor

cody271 commented Apr 10, 2023

2. Resize is kept enabled in fullscreen, so that the user can exit fullscreen via the window controls.

In testing the latest here, I noticed that this suffers from a similiar issue as window position page15 test had.
Exiting fullscreen via window controls means the checkbox is then out of sync with the fullscreen state, and the only way to stay in sync is either through polling the state or an event.
Maybe we need to add uiWindowOnFullscreenChanged() like we did for uiWindowOnPositionChanged() ?

@cody271 cody271 linked an issue Apr 10, 2023 that may be closed by this pull request
@szanni
Copy link
Contributor Author

szanni commented Apr 10, 2023

In testing the latest here, I noticed that this suffers from a similiar issue as window position page15 test had. Exiting fullscreen via window controls means the checkbox is then out of sync with the fullscreen state, and the only way to stay in sync is either through polling the state or an event. Maybe we need to add uiWindowOnFullscreenChanged() like we did for uiWindowOnPositionChanged() ?

That is correct and while uiWindowFullscreen() does return the correct state, I would love to have a uiWindowOnFullscreenChanged() and some qa instructions for darwin to test full screen via the window decorations.

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