Skip to content

Commit 5adc708

Browse files
Revert "gpui_macos: Fix deadlock during re-entrant key status changes (zed-industries#51035)"
This reverts commit 97049a7.
1 parent 97049a7 commit 5adc708

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

crates/gpui_macos/src/window.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,12 +2113,10 @@ extern "C" fn window_did_change_key_status(this: &Object, selector: Sel, _: id)
21132113
// in theory, we're not supposed to invoke this method manually but it balances out
21142114
// the spurious `becomeKeyWindow` event and helps us work around that bug.
21152115
if selector == sel!(windowDidBecomeKey:) && !is_active {
2116-
let native_window = lock.native_window;
2117-
drop(lock);
21182116
unsafe {
2119-
let _: () = msg_send![native_window, resignKeyWindow];
2117+
let _: () = msg_send![lock.native_window, resignKeyWindow];
2118+
return;
21202119
}
2121-
return;
21222120
}
21232121

21242122
let executor = lock.foreground_executor.clone();

0 commit comments

Comments
 (0)