Update libcosmic/iced for drag-and-drop fixes

This commit is contained in:
Ian Douglas Scott 2024-04-24 12:46:57 -07:00
parent ef12588615
commit 76daf6e980
3 changed files with 77 additions and 89 deletions

View file

@ -203,7 +203,6 @@ struct App {
conf: Conf,
core: cosmic::app::Core,
drop_target: Option<(ZcosmicWorkspaceHandleV1, wl_output::WlOutput)>,
dnd_started: bool,
}
impl App {
@ -400,14 +399,6 @@ impl Application for App {
}
}
}
WaylandEvent::DndOffer(evt) => {
// We don't hide the toplevel from the view until we get a
// `DndOffer` event, to make sure `start_grab` isn't called
// after the subsurface is destroyed.
//
// There should be a better way to do this.
self.dnd_started = true;
}
_ => {}
},
Msg::Wayland(evt) => {
@ -514,7 +505,6 @@ impl Application for App {
.iter()
.find(|(_, x)| &x.output == output)
{
self.dnd_started = false;
self.drag_surface = Some((id, drag_surface, size));
return start_drag(
vec![mime_type.to_string()],

View file

@ -33,9 +33,7 @@ pub(crate) fn layer_surface<'a>(
}
let mut drag_toplevel = None;
if let Some((_, DragSurface::Toplevel { handle, .. }, _)) = &app.drag_surface {
if app.dnd_started {
drag_toplevel = Some(handle);
}
drag_toplevel = Some(handle);
}
let layout = app.conf.workspace_config.workspace_layout;
let sidebar = workspaces_sidebar(