fix macos focus issue

Smit Barmase created

Change summary

crates/gpui/src/platform/mac/window.rs | 20 --------------------
1 file changed, 20 deletions(-)

Detailed changes

crates/gpui/src/platform/mac/window.rs 🔗

@@ -1995,26 +1995,6 @@ extern "C" fn window_did_change_key_status(this: &Object, selector: Sel, _: id)
     let executor = lock.executor.clone();
     drop(lock);
 
-    // If window is becoming active, trigger immediate synchronous frame request.
-    if selector == sel!(windowDidBecomeKey:) && is_active {
-        let window_state = unsafe { get_window_state(this) };
-        let mut lock = window_state.lock();
-
-        if let Some(mut callback) = lock.request_frame_callback.take() {
-            #[cfg(not(feature = "macos-blade"))]
-            lock.renderer.set_presents_with_transaction(true);
-            lock.stop_display_link();
-            drop(lock);
-            callback(Default::default());
-
-            let mut lock = window_state.lock();
-            lock.request_frame_callback = Some(callback);
-            #[cfg(not(feature = "macos-blade"))]
-            lock.renderer.set_presents_with_transaction(false);
-            lock.start_display_link();
-        }
-    }
-
     executor
         .spawn(async move {
             let mut lock = window_state.as_ref().lock();