mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 21:32:40 +00:00
Ensure key window is a GPUIWindow before returning its id
This commit is contained in:
parent
27a9d447cf
commit
215db4243c
1 changed files with 3 additions and 3 deletions
|
@ -245,11 +245,11 @@ impl Window {
|
|||
unsafe {
|
||||
let app = NSApplication::sharedApplication(nil);
|
||||
let key_window: id = msg_send![app, keyWindow];
|
||||
if key_window.is_null() {
|
||||
None
|
||||
} else {
|
||||
if msg_send![key_window, isKindOfClass: WINDOW_CLASS] {
|
||||
let id = get_window_state(&*key_window).borrow().id;
|
||||
Some(id)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue