macOS: Update window button visibility after toggling full screen
This commit is contained in:
parent
64fe9f82ed
commit
c41b65af97
@ -50,6 +50,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- Linux: Reduce minimum required OpenGL version from 3.3 to 3.1 + extensions (:iss:`2790`)
|
- Linux: Reduce minimum required OpenGL version from 3.3 to 3.1 + extensions (:iss:`2790`)
|
||||||
|
|
||||||
|
- macOS: Fix the window buttons not being hidden after exiting the traditional full screen (:iss:`6009`)
|
||||||
|
|
||||||
|
|
||||||
0.27.1 [2023-02-07]
|
0.27.1 [2023-02-07]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@ -2568,6 +2568,19 @@ bool _glfwPlatformToggleFullscreen(_GLFWwindow* w, unsigned int flags) {
|
|||||||
if (in_fullscreen) made_fullscreen = false;
|
if (in_fullscreen) made_fullscreen = false;
|
||||||
[window toggleFullScreen: nil];
|
[window toggleFullScreen: nil];
|
||||||
}
|
}
|
||||||
|
// Update window button visibility
|
||||||
|
if (w->ns.titlebar_hidden) {
|
||||||
|
// The hidden buttons might be automatically reset to be visible after going full screen
|
||||||
|
// to show up in the auto-hide title bar, so they need to be set back to hidden.
|
||||||
|
BOOL button_hidden = YES;
|
||||||
|
// When title bar is configured to be hidden, it should be shown with buttons (auto-hide) after going to full screen.
|
||||||
|
if (!traditional) {
|
||||||
|
button_hidden = (BOOL) !made_fullscreen;
|
||||||
|
}
|
||||||
|
[[window standardWindowButton: NSWindowCloseButton] setHidden:button_hidden];
|
||||||
|
[[window standardWindowButton: NSWindowMiniaturizeButton] setHidden:button_hidden];
|
||||||
|
[[window standardWindowButton: NSWindowZoomButton] setHidden:button_hidden];
|
||||||
|
}
|
||||||
return made_fullscreen;
|
return made_fullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user