From c3a5919e87cdc2b3fa87f5a7a21d6392b10b7205 Mon Sep 17 00:00:00 2001 From: electria Date: Thu, 9 Jul 2026 20:16:56 -0700 Subject: [PATCH] feat: drag and drop (outside of wayland) --- src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.rs b/src/main.rs index d31b558..838eba8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -111,6 +111,16 @@ impl State { _ => {} }, + Message::Event(iced::Event::Window(window_event)) => match window_event { + window::Event::FileDropped(file) => { + self.error = self.load_image(file); + return self.allocate_image(); + } + + // ignore unused window events + _ => {} + }, + // ignore unused events Message::Event(_) => {} }