Apply review fixes

- crates/ui-egui/src/app/input.rs
- crates/ui-egui/src/services.rs
This commit is contained in:
aiongg committed 2026-11-04 15:40:44 +00:00
1 parent 8815ef7350
commit 8b1e20fd8f
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -166,6 +166,7 @@ impl DesignApp {
/// Where the pointer is in the window, asked of the system ([`crate::Services::pointer`]),
/// for files dropped without pointer events: dragged in from another application, they bring
/// none. `None` when the system doesn't say or the window's place isn't known.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) fn system_pointer(&self, ctx: &egui::Context) -> Option<egui::Pos2> {
let at = (self.services.pointer.as_ref()?)()?;
// The system's points are unscaled; egui's (the window's rect too) are divided by the
+1 -1
View File
@@ -47,6 +47,6 @@ pub struct Services {
/// The pointer's place on the screen, asked when a file is dropped: a file dragged in from
/// another application brings no pointer events with it (winit reports none during a drag on
/// macOS), so without it a drop can't tell which frame it landed on. `None`: a drop without
/// pointer events loads the place cursor.
/// pointer events lands in the middle of the view.
pub pointer: Option<PointerFn>,
}