mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-28 12:21:55 +00:00
macOS: manually trigger windowDidResize when fullscreening
Fixes #4230 Fixes #4229
This commit is contained in:
parent
0830e66e76
commit
56e63baf5a
1 changed files with 4 additions and 0 deletions
|
|
@ -2476,6 +2476,10 @@ bool _glfwPlatformToggleFullscreen(_GLFWwindow* w, unsigned int flags) {
|
|||
}
|
||||
[window setStyleMask: sm];
|
||||
}
|
||||
// If the dock and menubar are hidden going from maximized to fullscreen doesnt change the window size
|
||||
// and macOS forgets to trigger windowDidResize, so call it ourselves
|
||||
NSNotification *notification = [NSNotification notificationWithName:NSWindowDidResizeNotification object:window];
|
||||
[w->ns.delegate performSelector:@selector(windowDidResize:) withObject:notification afterDelay:0];
|
||||
} else {
|
||||
bool in_fullscreen = sm & NSWindowStyleMaskFullScreen;
|
||||
if (in_fullscreen) made_fullscreen = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue