mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-07 17:43:53 +02:00
Make the Apple context preserving window 1x1
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user