mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-10 05:37:29 +03:00
Switched from active hover to NSViews acceptsFirstMouse API
Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
parent
88170df7f0
commit
95e661a78c
@ -443,6 +443,7 @@ impl Window {
|
|||||||
scene_to_render: Default::default(),
|
scene_to_render: Default::default(),
|
||||||
renderer: Renderer::new(true, fonts),
|
renderer: Renderer::new(true, fonts),
|
||||||
last_fresh_keydown: None,
|
last_fresh_keydown: None,
|
||||||
|
accepts_first_mouse: matches!(options.kind, WindowKind::PopUp),
|
||||||
traffic_light_position: options
|
traffic_light_position: options
|
||||||
.titlebar
|
.titlebar
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
@ -156,6 +156,7 @@ impl Presenter {
|
|||||||
self.cursor_regions = scene.cursor_regions();
|
self.cursor_regions = scene.cursor_regions();
|
||||||
self.mouse_regions = scene.mouse_regions();
|
self.mouse_regions = scene.mouse_regions();
|
||||||
|
|
||||||
|
// window.is_topmost for the mouse moved event's postion?
|
||||||
if cx.window_is_active(self.window_id) {
|
if cx.window_is_active(self.window_id) {
|
||||||
if let Some(event) = self.last_mouse_moved_event.clone() {
|
if let Some(event) = self.last_mouse_moved_event.clone() {
|
||||||
self.dispatch_event(event, true, cx);
|
self.dispatch_event(event, true, cx);
|
||||||
|
@ -31,14 +31,18 @@ use futures::{
|
|||||||
};
|
};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
actions,
|
actions,
|
||||||
|
color::Color,
|
||||||
elements::*,
|
elements::*,
|
||||||
geometry::vector::Vector2F,
|
geometry::{
|
||||||
|
rect::RectF,
|
||||||
|
vector::{vec2f, Vector2F},
|
||||||
|
},
|
||||||
impl_actions, impl_internal_actions,
|
impl_actions, impl_internal_actions,
|
||||||
keymap_matcher::KeymapContext,
|
keymap_matcher::KeymapContext,
|
||||||
platform::{CursorStyle, WindowOptions},
|
platform::{CursorStyle, WindowOptions},
|
||||||
AnyModelHandle, AnyViewHandle, AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle,
|
AnyModelHandle, AnyViewHandle, AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle,
|
||||||
MouseButton, MutableAppContext, PathPromptOptions, PromptLevel, RenderContext, SizeConstraint,
|
MouseButton, MutableAppContext, PathPromptOptions, PromptLevel, RenderContext, SizeConstraint,
|
||||||
Task, View, ViewContext, ViewHandle, WeakViewHandle,
|
Task, View, ViewContext, ViewHandle, WeakViewHandle, WindowBounds, WindowKind,
|
||||||
};
|
};
|
||||||
use item::{FollowableItem, FollowableItemHandle, Item, ItemHandle, ProjectItem};
|
use item::{FollowableItem, FollowableItemHandle, Item, ItemHandle, ProjectItem};
|
||||||
use language::LanguageRegistry;
|
use language::LanguageRegistry;
|
||||||
@ -98,7 +102,8 @@ actions!(
|
|||||||
ToggleLeftSidebar,
|
ToggleLeftSidebar,
|
||||||
ToggleRightSidebar,
|
ToggleRightSidebar,
|
||||||
NewTerminal,
|
NewTerminal,
|
||||||
NewSearch
|
NewSearch,
|
||||||
|
ShowNotif,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user