Skip to content

Commit

Permalink
#277 prevent *window_opacity_duration* from being used on Big Sur due…
Browse files Browse the repository at this point in the history
… to an Apple bug in the WindowServer
  • Loading branch information
koekeishiya committed Nov 13, 2020
1 parent 71fa53d commit 1e677d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/window_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1e677d4

Please sign in to comment.