Skip to content

Commit cd7ca0a

Browse files
committed
docs: describe requestAccessibility more precisely
1 parent ab931ab commit cd7ca0a

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

docs/breaking-changes.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Breaking changes
2+
3+
List of breaking changes between major versions.
4+
5+
## Planned Breaking API Changes (2.0)
6+
7+
### `windowManager.getScaleFactor(monitor: number)`
8+
9+
```typescript
10+
// Deprecated
11+
windowManager.getScaleFactor(windowManager.getActiveWindow().getMonitor());
12+
// Replace with
13+
windowManager.getActiveWindow().getMonitor().getScaleFactor();
14+
```
15+
16+
### `window.getMonitor(): number`
17+
18+
Now the `window.getMonitor` method returns [`Monitor`](monitor.md) object.
19+
20+
### `windowManager.requestAccessibility()` `macOS`
21+
22+
The `windowManager.requestAccessibility` method won't be required before each operation on windows anymore. Only on:
23+
24+
- `window.setBounds`
25+
- `window.maximize`
26+
- `window.minimize`
27+
- `window.restore`
28+
- `window.bringToTop`
29+
- `window.getTitle`

docs/window-manager.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@ console.log(window.getTitle());
1616
### Instance methods
1717

1818
#### windowManager.requestAccessibility() `macOS`
19-
Required before any action on macOS.
19+
20+
If the accessibility permission is not granted on `macOS`, it opens an accessibility permission request dialog.
21+
22+
The method is required to call before calling the following methods:
23+
24+
- `window.setBounds`
25+
- `window.maximize`
26+
- `window.minimize`
27+
- `window.restore`
28+
- `window.bringToTop`
29+
- `window.getTitle`
30+
2031
- Returns `boolean`
2132

2233
#### windowManager.getActiveWindow() `Windows` `macOS`

0 commit comments

Comments
 (0)