Skip to content

Commit

Permalink
#109 try to workaround weird resizing issues that occur for some appl…
Browse files Browse the repository at this point in the history
…ications
  • Loading branch information
koekeishiya committed Dec 6, 2020
1 parent e8b409b commit 88bc42e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 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
- Try to workaround resizing issues in some applications due to weird undocumented accessibility properties [#109](https://github.com/koekeishiya/yabai/issues/109)

## [3.3.5] - 2020-12-03
### Changed
Expand Down
2 changes: 2 additions & 0 deletions src/application.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ struct application *application_create(struct process *process)
struct application *application = malloc(sizeof(struct application));
memset(application, 0, sizeof(struct application));
application->ref = AXUIElementCreateApplication(process->pid);
AXUIElementSetAttributeValue(application->ref, kAXEnhancedUserInterface, kCFBooleanFalse);
AXUIElementSetAttributeValue(application->ref, kAXManualAccessibility, kCFBooleanTrue);
application->psn = process->psn;
application->pid = process->pid;
application->name = process->name;
Expand Down
3 changes: 3 additions & 0 deletions src/application.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef APPLICATION_H
#define APPLICATION_H

const CFStringRef kAXEnhancedUserInterface = CFSTR("AXEnhancedUserInterface");
const CFStringRef kAXManualAccessibility = CFSTR("AXManualAccessibility");

#define OBSERVER_CALLBACK(name) void name(AXObserverRef observer, AXUIElementRef element, CFStringRef notification, void *context)
typedef OBSERVER_CALLBACK(observer_callback);

Expand Down

0 comments on commit 88bc42e

Please sign in to comment.