diff --git a/kitty/glfw.c b/kitty/glfw.c index bee0b8c02..78fd2f90a 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -1408,15 +1408,16 @@ create_os_window(PyObject UNUSED *self, PyObject *args, PyObject *kw) { // creation, which causes a resize event and all the associated processing. // The temp window is used to get the DPI. On Wayland no temp window can be // used, so start with window visible unless hidden window requested. - glfwWindowHint(GLFW_VISIBLE, window_state != WINDOW_HIDDEN && global_state.is_wayland); GLFWwindow *common_context = global_state.num_os_windows ? global_state.os_windows[0].handle : NULL; GLFWwindow *temp_window = NULL; #ifdef __APPLE__ if (!apple_preserve_common_context) { - apple_preserve_common_context = glfwCreateWindow(640, 480, "kitty", NULL, common_context, NULL); + glfwWindowHint(GLFW_VISIBLE, false); + apple_preserve_common_context = glfwCreateWindow(1, 1, "kitty", NULL, common_context, NULL); } if (!common_context) common_context = apple_preserve_common_context; #endif + glfwWindowHint(GLFW_VISIBLE, window_state != WINDOW_HIDDEN && global_state.is_wayland); float xscale, yscale; double xdpi, ydpi; if (global_state.is_wayland) {