On Wed, 30 Apr 2025 17:52:01 GMT, Martin Fox <m...@openjdk.org> wrote:
> macOS will allow any window to enter fullscreen mode but won't expand the > window's size if the resizable bit isn't set in the window's style mask. For > undecorated stages the code has to set this bit before entering fullscreen > and restore the old value after exiting fullscreen. > > The old code was taking a pointer to an NSWindow and casting it to a pointer > to an unrelated type (GlassWindow). It was also making an unnecessary check. > windowWillEnterFullScreen stashes away the state of the resizable bit before > setting it and windowDidExitFullScreen restores the old state. There's no > need for setResizableForFullscreen to check anything, it just needs to do > what it's told. > > System tests for this case are underway as part of PR #1789. > > You might have difficulty reproducing the bug in the master branch. The old > code was doing a bogus pointer cast and then dereferencing it to check a > state flag so the code sometimes worked and sometimes didn't. > Does this PR depend on #1789 in any way (system tests?). In other words, > should we wait for 1789 before looking at this, or this PR is sufficiently > independent? This is a small enough PR that I was hoping to get it in before #1789 which might take a while to go through. Still, it needs to be tested with all of the different stage styles and #1789 has all the system tests for that. I've been testing it using a manual test app, the one I attached to [JDK-8355990](https://bugs.openjdk.org/browse/JDK-8355990). #1789 also has a manual test case you can grab (it's called TestStage.java). Let me know if you want one of these attached here or to the JBS ticket. Never sure how to deal with this chicken-and-egg problem. I've been trying to get fixes in before the tests in #1789 are submitted since that seems less complicated than disabling the tests in that PR and then having to go back and re-enable them piecemeal later. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1799#issuecomment-2843010679