macOS: Fix regression that caused the macos_option_al_alt setting to always be set to no for all os windows ina kitty instance after the first. Fixes #571

This commit is contained in:
Kovid Goyal 2018-05-24 09:14:13 +05:30
parent 23d0f5ce32
commit 2e07159461
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -385,12 +385,14 @@ create_os_window(PyObject UNUSED *self, PyObject *args) {
Py_DECREF(ret);
#ifdef __APPLE__
cocoa_create_global_menu();
if (OPT(macos_option_as_alt)) glfwSetCocoaTextInputFilter(glfw_window, filter_option);
// This needs to be done only after the first window has been created, because glfw only sets the activation policy once upon initialization.
if (OPT(macos_hide_from_tasks)) cocoa_set_hide_from_tasks();
#endif
is_first_window = false;
}
#ifdef __APPLE__
if (OPT(macos_option_as_alt)) glfwSetCocoaTextInputFilter(glfw_window, filter_option);
#endif
OSWindow *w = add_os_window();
w->handle = glfw_window;