1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 22:42:48 +03:00

macos: implement window:focus()

refs: https://github.com/wez/wezterm/issues/2973
This commit is contained in:
Wez Furlong 2023-01-18 23:25:19 -07:00
parent 6d2b42c95e
commit 5dbdd36a72
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387
2 changed files with 6 additions and 2 deletions

View File

@ -6,7 +6,7 @@ Attempts to focus and activate the window.
|OS |Supported?|
|---------------|------------------------|
|macOS |Not yet implemented |
|macOS |Yes |
|Windows |Yes |
|X11 |Yes |
|Wayland |Wayland does not allow this action|

View File

@ -994,7 +994,11 @@ impl WindowInner {
}
}
fn focus(&mut self) {}
fn focus(&mut self) {
unsafe{
self.window.makeKeyAndOrderFront_(nil);
}
}
fn hide(&mut self) {
unsafe {