Detailed changes
@@ -45,7 +45,6 @@ pub fn init(cx: &mut MutableAppContext) {
kind: WindowKind::PopUp,
is_movable: false,
screen: Some(screen),
- accepts_first_mouse: true,
},
|_| IncomingCallNotification::new(incoming_call.clone()),
);
@@ -44,7 +44,6 @@ pub fn init(cx: &mut MutableAppContext) {
kind: WindowKind::PopUp,
is_movable: false,
screen: Some(screen),
- accepts_first_mouse: true,
},
|_| {
ProjectSharedNotification::new(
@@ -156,7 +156,6 @@ pub struct WindowOptions<'a> {
pub kind: WindowKind,
pub is_movable: bool,
pub screen: Option<Rc<dyn Screen>>,
- pub accepts_first_mouse: bool,
}
#[derive(Debug)]
@@ -180,7 +179,7 @@ impl Default for Appearance {
}
}
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum WindowKind {
Normal,
PopUp,
@@ -302,7 +301,6 @@ impl<'a> Default for WindowOptions<'a> {
kind: WindowKind::Normal,
is_movable: true,
screen: None,
- accepts_first_mouse: false,
}
}
}
@@ -443,7 +443,7 @@ impl Window {
scene_to_render: Default::default(),
renderer: Renderer::new(true, fonts),
last_fresh_keydown: None,
- accepts_first_mouse: matches!(options.kind, WindowKind::PopUp),
+ accepts_first_mouse: options.kind == WindowKind::PopUp,
traffic_light_position: options
.titlebar
.as_ref()
@@ -451,7 +451,6 @@ impl Window {
previous_modifiers_changed_event: None,
ime_state: ImeState::None,
ime_text: None,
- accepts_first_mouse: options.accepts_first_mouse,
})));
(*native_window).set_ivar(
@@ -31,18 +31,14 @@ use futures::{
};
use gpui::{
actions,
- color::Color,
elements::*,
- geometry::{
- rect::RectF,
- vector::{vec2f, Vector2F},
- },
+ geometry::vector::Vector2F,
impl_actions, impl_internal_actions,
keymap_matcher::KeymapContext,
platform::{CursorStyle, WindowOptions},
AnyModelHandle, AnyViewHandle, AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle,
MouseButton, MutableAppContext, PathPromptOptions, PromptLevel, RenderContext, SizeConstraint,
- Task, View, ViewContext, ViewHandle, WeakViewHandle, WindowBounds, WindowKind,
+ Task, View, ViewContext, ViewHandle, WeakViewHandle,
};
use item::{FollowableItem, FollowableItemHandle, Item, ItemHandle, ProjectItem};
use language::LanguageRegistry;
@@ -408,7 +408,6 @@ pub fn build_window_options() -> WindowOptions<'static> {
kind: WindowKind::Normal,
is_movable: true,
screen: None,
- accepts_first_mouse: false,
}
}