diff --git a/cosmic-app-list/src/app.rs b/cosmic-app-list/src/app.rs index e4f839f5..30936195 100755 --- a/cosmic-app-list/src/app.rs +++ b/cosmic-app-list/src/app.rs @@ -1265,11 +1265,7 @@ impl cosmic::Application for CosmicAppList { let Some(exec) = dock_item.desktop_info.exec() else { return Task::none(); }; - let Some(existing_popup) = self.popup.take() else { - return Task::none(); - }; - let Some(rectangle) = self.rectangles.get(&dock_item.id.into()) else { - self.popup = Some(existing_popup); + let Some(existing_popup) = self.popup.as_mut() else { return Task::none(); }; @@ -1303,40 +1299,8 @@ impl cosmic::Application for CosmicAppList { error: None, }); - let new_id = window::Id::unique(); - let mut popup_settings = self.core.applet.get_popup_settings( - existing_popup.parent, - new_id, - None, - None, - None, - ); - let iced::Rectangle { - x, - y, - width, - height, - } = *rectangle; - popup_settings.positioner.anchor_rect = iced::Rectangle:: { - x: x as i32, - y: y as i32, - width: width as i32, - height: height as i32, - }; - popup_settings.positioner.size_limits = Limits::NONE - .min_width(480.) - .min_height(1.) - .max_width(520.) - .max_height(1000.); - - self.popup = Some(Popup { - parent: existing_popup.parent, - id: new_id, - dock_item, - popup_type: PopupType::LauncherEditor, - }); - - return Task::batch([destroy_popup(existing_popup.id), get_popup(popup_settings)]); + existing_popup.dock_item = dock_item; + existing_popup.popup_type = PopupType::LauncherEditor; } Message::LauncherNameChanged(name) => { if let Some(edit) = self.launcher_edit.as_mut()