From 1e677d487c76b6ddb02f91aa0679b4708365fb8a Mon Sep 17 00:00:00 2001 From: koekeishiya Date: Fri, 13 Nov 2020 14:55:29 +0100 Subject: [PATCH] #277 prevent *window_opacity_duration* from being used on Big Sur due to an Apple bug in the WindowServer --- CHANGELOG.md | 2 ++ src/message.c | 4 ++-- src/window_manager.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d86d1c3c..6321cde4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Prevent *window_opacity_duration* from being used on Big Sur, because of an Apple bug [#277](https://github.com/koekeishiya/yabai/issues/277) ## [3.3.2] - 2020-11-13 ### Changed diff --git a/src/message.c b/src/message.c index 4962ceb6..e311c759 100644 --- a/src/message.c +++ b/src/message.c @@ -445,10 +445,10 @@ static void handle_domain_config(FILE *rsp, struct token domain, char *message) struct token value = get_token(&message); if (!token_is_valid(value)) { fprintf(rsp, "%f\n", g_window_manager.window_opacity_duration); - } else if (!workspace_is_macos_catalina()) { + } else if (!workspace_is_macos_catalina() && !workspace_is_macos_bigsur()) { g_window_manager.window_opacity_duration = token_to_float(value); } else { - daemon_fail(rsp, "'%s' cannot be changed on macOS Catalina because of an Apple bug in the WindowServer\n", COMMAND_CONFIG_OPACITY_DURATION); + daemon_fail(rsp, "'%s' cannot be changed on macOS Catalina/Big Sur because of an Apple bug in the WindowServer\n", COMMAND_CONFIG_OPACITY_DURATION); } } else if (token_equals(command, COMMAND_CONFIG_BORDER)) { struct token value = get_token(&message); diff --git a/src/window_manager.c b/src/window_manager.c index 8700883b..9336faee 100644 --- a/src/window_manager.c +++ b/src/window_manager.c @@ -1546,7 +1546,7 @@ void window_manager_init(struct window_manager *wm) wm->enable_window_topmost = false; wm->active_window_opacity = 1.0f; wm->normal_window_opacity = 1.0f; - wm->window_opacity_duration = workspace_is_macos_catalina() ? 0.0f : 0.2f; + wm->window_opacity_duration = 0.0f; wm->insert_feedback_windows = NULL; wm->insert_feedback_color = rgba_color_from_hex(0xffd75f5f); wm->active_border_color = rgba_color_from_hex(0xff775759);