[rcore][GLFW] Fix ToggleBorderlessWindowed() entering exclusive fullscreen instead of windowed - #6026
Open
tillua467 wants to merge 2 commits into
Open
[rcore][GLFW] Fix ToggleBorderlessWindowed() entering exclusive fullscreen instead of windowed#6026tillua467 wants to merge 2 commits into
ToggleBorderlessWindowed() entering exclusive fullscreen instead of windowed#6026tillua467 wants to merge 2 commits into
Conversation
…lscreen instead of windowed ToggleBorderlessWindowed() passes monitors[monitor] as the monitor argument. but passing a non-NULL monitor here is what puts a window into full screen mode that's the exact same call ToggleFullscreen() makes, Since borderless windowed is supposed to stay in windowed mode, this should be NULL instead Signed-off-by: tillua467 <tillua467@gmail.com>
Owner
|
@tillua467 thanks for the review, all |
ToggleBorderlessWindowed() entering exclusive fullscreen instead of windowed
Author
|
@raysan5 hello thanks for looking at my pr! i did tested on multiple monitors and tested and it works fine! the windows did minimize at the monitor it was opened, and also sadly i don't own a mac device so i can't really test that sorry |
…itor()` the glfw documentation clearly says - When the monitor is NULL, the position, width and height are used to place the window content area. The refresh rate is ignored when no monitor is specified. so it' useless to pass a refreshrate, not to mention we are already doing it in https://github.com/raysan5/raylib/blob/63f82f0ca873f762ffea0c83ed14e461a905b7fc/src/platforms/rcore_desktop_glfw.c#L241 Signed-off-by: tillua467 <tillua467@gmail.com>
Author
|
@raysan5 i found a weird bug after my commit, it seems when the window is minimized it doesn't minimized to the original, i happens because we call Haven't tested it in my Debian I will test tomorrow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5854
glfwSetWindowMonitor()was called with a non NULL monitor handle when entering borderless windowed mode. Per GLFW's documented behavior, a non NULL monitor negotiates exclusive fullscreen, which is the same callToggleFullscreen()makes not what borderless windowed is supposed to do. The windowed restore branch of this same function already callsglfwSetWindowMonitor()with NULL for this reason, this makes the enter branch consistent with it.Checked on Windows 11 works as intended, although it's not a issue in linux i did checked on debian gnome and wslg, no issue there as well.