mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: Implement BrowserWindow.setFocusable on macOS (#19033)
It was not implemented on Mac despite being available as a constructor option. Implementation already exists on Windows. Linux case can be separately. https://github.com/electron/electron/issues/19032 Notes: Implemented BrowserWindow.setFocusable on macOS.
This commit is contained in:
committed by
Cheng Zhao
parent
e6a7a84834
commit
09c3277b42
@@ -1551,12 +1551,14 @@ Prevents the window contents from being captured by other apps.
|
||||
On macOS it sets the NSWindow's sharingType to NSWindowSharingNone.
|
||||
On Windows it calls SetWindowDisplayAffinity with `WDA_MONITOR`.
|
||||
|
||||
#### `win.setFocusable(focusable)` _Windows_
|
||||
#### `win.setFocusable(focusable)` _macOS_ _Windows_
|
||||
|
||||
* `focusable` Boolean
|
||||
|
||||
Changes whether the window can be focused.
|
||||
|
||||
On macOS it does not remove the focus from the window.
|
||||
|
||||
#### `win.setParentWindow(parent)`
|
||||
|
||||
* `parent` BrowserWindow
|
||||
|
||||
Reference in New Issue
Block a user