Skip to content

Commit

Permalink
#169 properly detect when mission-control is deactivated
Browse files Browse the repository at this point in the history
  • Loading branch information
koekeishiya committed Jul 29, 2019
1 parent 7641afd commit 5977da9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Ignore all windows that report a main role of AXPopover [#162](https://github.com/koekeishiya/yabai/issues/162)
- Ignore all windows that report a sub role of AXUnknown [#164](https://github.com/koekeishiya/yabai/issues/164)
- Track when the Dock changes preferences [#147](https://github.com/koekeishiya/yabai/issues/147)
- Properly detect when mission-control is deactivated [#169](https://github.com/koekeishiya/yabai/issues/169)

## [1.1.2] - 2019-07-15
### Changed
Expand Down
9 changes: 4 additions & 5 deletions src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,6 @@ static EVENT_CALLBACK(EVENT_HANDLER_MISSION_CONTROL_ENTER)
return EVENT_SUCCESS;
}

static CFStringRef CFSTR_DOCK = CFSTR("Dock");
static EVENT_CALLBACK(EVENT_HANDLER_MISSION_CONTROL_CHECK_FOR_EXIT)
{
if (!g_mission_control_active) return EVENT_FAILURE;
Expand All @@ -1060,13 +1059,13 @@ static EVENT_CALLBACK(EVENT_HANDLER_MISSION_CONTROL_CHECK_FOR_EXIT)
for (int i = 0; i < window_count; ++i) {
CFDictionaryRef dictionary = CFArrayGetValueAtIndex(window_list, i);

CFStringRef name = CFDictionaryGetValue(dictionary, kCGWindowName);
if (name) continue;

CFStringRef owner = CFDictionaryGetValue(dictionary, kCGWindowOwnerName);
if (!owner) continue;

CFStringRef name = CFDictionaryGetValue(dictionary, kCGWindowName);
if (!name) continue;

if (CFEqual(CFSTR_DOCK, owner) && CFEqual(CFSTR_DOCK, name)) {
if (CFEqual(CFSTR("Dock"), owner)) {
found = true;
break;
}
Expand Down

0 comments on commit 5977da9

Please sign in to comment.