Skip to content

Commit

Permalink
Enable unfocused windows to update their status based on whether they…
Browse files Browse the repository at this point in the history
… are clickable or not (#10229)

- Fixed #9784 By removing the interception of the MouseMove event, zed
can update the corresponding Hover even when it is inactive
  • Loading branch information
weartist committed Apr 24, 2024
1 parent dfd4d2a commit 135a5f2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions crates/gpui/src/platform/mac/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ struct MacWindowState {
native_view: NonNull<Object>,
display_link: Option<DisplayLink>,
renderer: renderer::Renderer,
kind: WindowKind,
request_frame_callback: Option<Box<dyn FnMut()>>,
event_callback: Option<Box<dyn FnMut(PlatformInput) -> crate::DispatchEventResult>>,
activate_callback: Option<Box<dyn FnMut(bool)>>,
Expand Down Expand Up @@ -633,7 +632,6 @@ impl MacWindow {
native_view as *mut _,
window_size,
),
kind,
request_frame_callback: None,
event_callback: None,
activate_callback: None,
Expand Down Expand Up @@ -1343,7 +1341,6 @@ extern "C" fn handle_view_event(this: &Object, _: Sel, native_event: id) {
let window_state = unsafe { get_window_state(this) };
let weak_window_state = Arc::downgrade(&window_state);
let mut lock = window_state.as_ref().lock();
let is_active = unsafe { lock.native_window.isKeyWindow() == YES };
let window_height = lock.content_size().height;
let event = unsafe { PlatformInput::from_native(native_event, Some(window_height)) };

Expand Down Expand Up @@ -1429,8 +1426,6 @@ extern "C" fn handle_view_event(this: &Object, _: Sel, native_event: id) {
}
}

PlatformInput::MouseMove(_) if !(is_active || lock.kind == WindowKind::PopUp) => return,

PlatformInput::MouseUp(MouseUpEvent { .. }) => {
lock.synthetic_drag_counter += 1;
}
Expand Down

0 comments on commit 135a5f2

Please sign in to comment.