mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-21 03:27:55 +03:00
macOS: manually trigger windowDidResize when fullscreening
Fixes #4230 Fixes #4229
This commit is contained in:
parent
0830e66e76
commit
56e63baf5a
@ -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…
Reference in New Issue
Block a user