mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-30 17:50:06 +00:00
Make the Apple context preserving window 1x1
This commit is contained in:
parent
ce4c511fdc
commit
b241811a74
1 changed files with 3 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue