Hide toplevel from toplevel list when it is being dragged

Uses a custom wrapper widget, that makes `draw` do nothing when visible
is set to false.

This works well sometimes, but can cause weird bugs...
This commit is contained in:
Ian Douglas Scott 2024-04-19 12:05:35 -07:00
parent b011ecd615
commit 09e03cd096
4 changed files with 127 additions and 5 deletions

View file

@ -359,7 +359,9 @@ impl Application for App {
fn update(&mut self, message: Msg) -> Command<cosmic::app::Message<Msg>> {
match message {
Msg::SourceFinished => {}
Msg::SourceFinished => {
self.drag_surface = None;
}
Msg::WaylandEvent(evt) => match evt {
WaylandEvent::Output(evt, output) => {
// TODO: Less hacky way to get connection from iced-sctk