mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-13 12:09:35 +03:00
macOS: Fix keyboard input not working after toggling traditional fullscreen till the window is clicked in
This commit is contained in:
parent
181178b0ea
commit
0965fc45f2
@ -143,6 +143,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
- When remembering OS window sizes for full screen windows use the size before
|
||||
the window became fullscreen (:iss:`4221`)
|
||||
|
||||
- macOS: Fix keyboard input not working after toggling traditional fullscreen
|
||||
till the window is clicked in
|
||||
|
||||
|
||||
0.23.1 [2021-08-17]
|
||||
----------------------
|
||||
|
@ -470,7 +470,7 @@ is_modified_tab(NSEvent *event, NSEventModifierFlags modifierFlags) {
|
||||
// ctrl+whatever+tab, option+cmd+tab
|
||||
if (
|
||||
(
|
||||
(modifierFlags & NSEventModifierFlagControl) ||
|
||||
(modifierFlags & NSEventModifierFlagControl) ||
|
||||
modifierFlags == (NSEventModifierFlagOption | NSEventModifierFlagCommand)
|
||||
) && [event.charactersIgnoringModifiers isEqualToString:@"\t"]
|
||||
) return true;
|
||||
|
@ -2464,9 +2464,6 @@ bool _glfwPlatformToggleFullscreen(_GLFWwindow* w, unsigned int flags) {
|
||||
[[NSApplication sharedApplication] setPresentationOptions: NSApplicationPresentationDefault];
|
||||
w->ns.in_traditional_fullscreen = false;
|
||||
}
|
||||
// At this point keyboard input does not work even though isKeyWindow returns true
|
||||
// Calling makeKeyAndOrderFront also has no effect. Neither does calling becomeKeyWindow
|
||||
// Calling them after an interval with performSelector also has no effect
|
||||
} else {
|
||||
bool in_fullscreen = sm & NSWindowStyleMaskFullScreen;
|
||||
if (!(in_fullscreen)) {
|
||||
@ -2479,6 +2476,8 @@ bool _glfwPlatformToggleFullscreen(_GLFWwindow* w, unsigned int flags) {
|
||||
}
|
||||
[window setStyleMask: sm];
|
||||
}
|
||||
// Changing the style mask causes the first responder to be cleared
|
||||
[window makeFirstResponder:w->ns.view];
|
||||
// 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];
|
||||
|
Loading…
Reference in New Issue
Block a user