macOS: Fix window shadows not being drawn for transparent windows

Re-organize the whole infrastructure for setting window chrome, doing it
in a single function that has access to all settings.

Fixes #2827
Fixes #6416
This commit is contained in:
Kovid Goyal
2023-07-04 11:59:50 +05:30
parent b9bb9248f0
commit d3f14ffbf4
16 changed files with 249 additions and 183 deletions

6
kitty/glfw-wrapper.c generated
View File

@@ -413,9 +413,6 @@ load_glfw(const char* path) {
*(void **) (&glfwGetCocoaWindow_impl) = dlsym(handle, "glfwGetCocoaWindow");
if (glfwGetCocoaWindow_impl == NULL) dlerror(); // clear error indicator
*(void **) (&glfwHideCocoaTitlebar_impl) = dlsym(handle, "glfwHideCocoaTitlebar");
if (glfwHideCocoaTitlebar_impl == NULL) dlerror(); // clear error indicator
*(void **) (&glfwGetNSGLContext_impl) = dlsym(handle, "glfwGetNSGLContext");
if (glfwGetNSGLContext_impl == NULL) dlerror(); // clear error indicator
@@ -458,6 +455,9 @@ load_glfw(const char* path) {
*(void **) (&glfwSetPrimarySelectionString_impl) = dlsym(handle, "glfwSetPrimarySelectionString");
if (glfwSetPrimarySelectionString_impl == NULL) dlerror(); // clear error indicator
*(void **) (&glfwCocoaSetWindowChrome_impl) = dlsym(handle, "glfwCocoaSetWindowChrome");
if (glfwCocoaSetWindowChrome_impl == NULL) dlerror(); // clear error indicator
*(void **) (&glfwGetPrimarySelectionString_impl) = dlsym(handle, "glfwGetPrimarySelectionString");
if (glfwGetPrimarySelectionString_impl == NULL) dlerror(); // clear error indicator