feat: drag and drop (outside of wayland)

This commit is contained in:
electria 2026-07-09 20:16:56 -07:00
commit c3a5919e87
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -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(_) => {}
}