diff --git a/crates/gpui_macos/src/window.rs b/crates/gpui_macos/src/window.rs index 51adfe50b321b7..b0abd8ffb7e0c5 100644 --- a/crates/gpui_macos/src/window.rs +++ b/crates/gpui_macos/src/window.rs @@ -288,15 +288,6 @@ unsafe fn build_classes() { sel!(characterIndexForPoint:), character_index_for_point as extern "C" fn(&Object, Sel, NSPoint) -> u64, ); - - // Undocumented SPI, also implemented by Chromium's content view. This - // lets full size content windows mark our Metal view as app owned title - // bar content, avoiding AppKit's title bar click-delay behavior. - decl.add_method( - sel!(_opaqueRectForWindowMoveWhenInTitlebar), - opaque_rect_for_window_move_when_in_titlebar - as extern "C" fn(&Object, Sel) -> NSRect, - ); decl.register() }; BLURRED_VIEW_CLASS = { @@ -2762,25 +2753,6 @@ extern "C" fn accepts_first_mouse(this: &Object, _: Sel, _: id) -> BOOL { YES } -extern "C" fn opaque_rect_for_window_move_when_in_titlebar(this: &Object, _: Sel) -> NSRect { - unsafe { - let window: id = msg_send![this, window]; - if window == nil { - return NSRect::new(NSPoint::new(0., 0.), NSSize::new(0., 0.)); - } - - let style_mask: NSWindowStyleMask = msg_send![window, styleMask]; - if style_mask.contains(NSWindowStyleMask::NSFullSizeContentViewWindowMask) { - // Declare the entire view as opaque content for window move purposes - // when using a custom titlebar, so AppKit doesn't wait for double click - // disambiguation before delivering clicks to titlebar controls. - msg_send![this, bounds] - } else { - NSRect::new(NSPoint::new(0., 0.), NSSize::new(0., 0.)) - } - } -} - extern "C" fn character_index_for_point(this: &Object, _: Sel, position: NSPoint) -> u64 { let position = screen_point_to_gpui_point(this, position); with_input_handler(this, |input_handler| {