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

152
Cargo.lock generated
View file

@ -334,8 +334,8 @@ dependencies = [
"futures-io",
"futures-lite 2.3.0",
"parking",
"polling 3.6.0",
"rustix 0.38.32",
"polling 3.7.0",
"rustix 0.38.34",
"slab",
"tracing",
"windows-sys 0.52.0",
@ -374,15 +374,15 @@ dependencies = [
"cfg-if",
"event-listener 3.1.0",
"futures-lite 1.13.0",
"rustix 0.38.32",
"rustix 0.38.34",
"windows-sys 0.48.0",
]
[[package]]
name = "async-process"
version = "2.2.1"
version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cad07b3443bfa10dcddf86a452ec48949e8e7fedf7392d82de3969fda99e90ed"
checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d"
dependencies = [
"async-channel",
"async-io 2.3.2",
@ -393,7 +393,7 @@ dependencies = [
"cfg-if",
"event-listener 5.3.0",
"futures-lite 2.3.0",
"rustix 0.38.32",
"rustix 0.38.34",
"tracing",
"windows-sys 0.52.0",
]
@ -411,20 +411,20 @@ dependencies = [
[[package]]
name = "async-signal"
version = "0.2.5"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5"
checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda"
dependencies = [
"async-io 2.3.2",
"async-lock 2.8.0",
"async-lock 3.3.0",
"atomic-waker",
"cfg-if",
"futures-core",
"futures-io",
"rustix 0.38.32",
"rustix 0.38.34",
"signal-hook-registry",
"slab",
"windows-sys 0.48.0",
"windows-sys 0.52.0",
]
[[package]]
@ -467,7 +467,7 @@ name = "atomicwrites"
version = "0.4.2"
source = "git+https://github.com/jackpot51/rust-atomicwrites#043ab4859d53ffd3d55334685303d8df39c9f768"
dependencies = [
"rustix 0.38.32",
"rustix 0.38.34",
"tempfile",
"windows-sys 0.48.0",
]
@ -671,8 +671,8 @@ dependencies = [
"async-task",
"bitflags 2.5.0",
"log",
"polling 3.6.0",
"rustix 0.38.32",
"polling 3.7.0",
"rustix 0.38.34",
"slab",
"thiserror",
]
@ -684,16 +684,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20"
dependencies = [
"calloop",
"rustix 0.38.32",
"rustix 0.38.34",
"wayland-backend",
"wayland-client",
]
[[package]]
name = "cc"
version = "1.0.94"
version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7"
checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b"
[[package]]
name = "cfg-expr"
@ -981,7 +981,7 @@ dependencies = [
[[package]]
name = "cosmic-comp-config"
version = "0.1.0"
source = "git+https://github.com/pop-os/cosmic-comp#8cee91c88fce2ff69bd659ccf22c86f0a691e3a1"
source = "git+https://github.com/pop-os/cosmic-comp#90227471bf66b4f63554905becfcf3308f3fedeb"
dependencies = [
"cosmic-config",
"input",
@ -991,7 +991,7 @@ dependencies = [
[[package]]
name = "cosmic-config"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"atomicwrites",
"cosmic-config-derive",
@ -1008,7 +1008,7 @@ dependencies = [
[[package]]
name = "cosmic-config-derive"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"quote",
"syn 1.0.109",
@ -1052,7 +1052,7 @@ dependencies = [
[[package]]
name = "cosmic-theme"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"almost",
"cosmic-config",
@ -1089,7 +1089,7 @@ dependencies = [
"memmap2 0.9.4",
"once_cell",
"rust-embed",
"rustix 0.38.32",
"rustix 0.38.34",
"tokio",
"wayland-protocols",
"zbus 4.1.2",
@ -1386,7 +1386,7 @@ source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-4#6ca3c
dependencies = [
"bitflags 2.5.0",
"mime",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"smithay-client-toolkit",
"smithay-clipboard",
]
@ -1407,7 +1407,7 @@ dependencies = [
"bytemuck",
"drm-ffi 0.7.1",
"drm-fourcc",
"rustix 0.38.32",
"rustix 0.38.34",
]
[[package]]
@ -1420,7 +1420,7 @@ dependencies = [
"bytemuck",
"drm-ffi 0.8.0",
"drm-fourcc",
"rustix 0.38.32",
"rustix 0.38.34",
]
[[package]]
@ -1430,7 +1430,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6"
dependencies = [
"drm-sys 0.6.1",
"rustix 0.38.32",
"rustix 0.38.34",
]
[[package]]
@ -1440,7 +1440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97c98727e48b7ccb4f4aea8cfe881e5b07f702d17b7875991881b41af7278d53"
dependencies = [
"drm-sys 0.7.0",
"rustix 0.38.32",
"rustix 0.38.34",
]
[[package]]
@ -2485,7 +2485,7 @@ dependencies = [
[[package]]
name = "iced"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"dnd",
"iced_accessibility",
@ -2503,7 +2503,7 @@ dependencies = [
[[package]]
name = "iced_accessibility"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"accesskit",
"accesskit_unix",
@ -2512,7 +2512,7 @@ dependencies = [
[[package]]
name = "iced_core"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"bitflags 2.5.0",
"dnd",
@ -2521,7 +2521,7 @@ dependencies = [
"mime",
"num-traits",
"palette",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"serde",
"smithay-client-toolkit",
"smol_str",
@ -2534,7 +2534,7 @@ dependencies = [
[[package]]
name = "iced_futures"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"futures",
"iced_core",
@ -2547,7 +2547,7 @@ dependencies = [
[[package]]
name = "iced_graphics"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"bitflags 2.5.0",
"bytemuck",
@ -2561,7 +2561,7 @@ dependencies = [
"log",
"lyon_path",
"once_cell",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"rustc-hash",
"thiserror",
"unicode-segmentation",
@ -2571,7 +2571,7 @@ dependencies = [
[[package]]
name = "iced_renderer"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"iced_graphics",
"iced_tiny_skia",
@ -2583,7 +2583,7 @@ dependencies = [
[[package]]
name = "iced_runtime"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"dnd",
"iced_accessibility",
@ -2597,7 +2597,7 @@ dependencies = [
[[package]]
name = "iced_sctk"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"enum-repr",
"float-cmp",
@ -2608,7 +2608,7 @@ dependencies = [
"iced_style",
"itertools",
"lazy_static",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"smithay-client-toolkit",
"thiserror",
"tracing",
@ -2623,7 +2623,7 @@ dependencies = [
[[package]]
name = "iced_style"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"iced_core",
"once_cell",
@ -2633,7 +2633,7 @@ dependencies = [
[[package]]
name = "iced_tiny_skia"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"bytemuck",
"cosmic-text",
@ -2650,7 +2650,7 @@ dependencies = [
[[package]]
name = "iced_wgpu"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"bitflags 2.5.0",
"bytemuck",
@ -2669,7 +2669,7 @@ dependencies = [
[[package]]
name = "iced_widget"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"dnd",
"iced_renderer",
@ -2930,7 +2930,7 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
name = "libcosmic"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#c0b653f506fd8f389d4cc2c762e41ddb45b02a80"
source = "git+https://github.com/pop-os/libcosmic#a0ed887b7d73ebb69c2aff7bb230c43d9754c742"
dependencies = [
"apply",
"ashpd 0.7.0",
@ -3112,9 +3112,9 @@ dependencies = [
[[package]]
name = "lyon_tessellation"
version = "1.0.13"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c7c67b5bc8123b352b2e7e742b47d1f236a13fe77619433be9568fbd888e9c0"
checksum = "4470bd0b1f29eda66068ab1fd47719facda0a136b829bcca69287ed0ac40a134"
dependencies = [
"float_next_after",
"lyon_path",
@ -3687,15 +3687,15 @@ dependencies = [
[[package]]
name = "polling"
version = "3.6.0"
version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6"
checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3"
dependencies = [
"cfg-if",
"concurrent-queue",
"hermit-abi",
"pin-project-lite",
"rustix 0.38.32",
"rustix 0.38.34",
"tracing",
"windows-sys 0.52.0",
]
@ -3847,9 +3847,9 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9"
[[package]]
name = "raw-window-handle"
version = "0.6.0"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544"
checksum = "8cc3bcbdb1ddfc11e700e62968e6b4cc9c75bb466464ad28fb61c5b2c964418b"
[[package]]
name = "rayon"
@ -4091,9 +4091,9 @@ dependencies = [
[[package]]
name = "rustix"
version = "0.38.32"
version = "0.38.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89"
checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
dependencies = [
"bitflags 2.5.0",
"errno",
@ -4219,9 +4219,9 @@ dependencies = [
[[package]]
name = "signal-hook-registry"
version = "1.4.1"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
dependencies = [
"libc",
]
@ -4285,7 +4285,7 @@ dependencies = [
"log",
"memmap2 0.9.4",
"pkg-config",
"rustix 0.38.32",
"rustix 0.38.34",
"thiserror",
"wayland-backend",
"wayland-client",
@ -4304,7 +4304,7 @@ version = "0.8.0"
source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-dnd-3#2f2430bec35f0adb9cb93e85e648ff8449d44dad"
dependencies = [
"libc",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"smithay-client-toolkit",
"wayland-backend",
]
@ -4355,9 +4355,9 @@ dependencies = [
"log",
"memmap2 0.9.4",
"objc",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"redox_syscall 0.4.1",
"rustix 0.38.32",
"rustix 0.38.34",
"tiny-xlib",
"wasm-bindgen",
"wayland-backend",
@ -4515,7 +4515,7 @@ checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
dependencies = [
"cfg-if",
"fastrand 2.0.2",
"rustix 0.38.32",
"rustix 0.38.34",
"windows-sys 0.52.0",
]
@ -4530,18 +4530,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.58"
version = "1.0.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297"
checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.58"
version = "1.0.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66"
dependencies = [
"proc-macro2",
"quote",
@ -5084,7 +5084,7 @@ checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40"
dependencies = [
"cc",
"downcast-rs",
"rustix 0.38.32",
"rustix 0.38.34",
"scoped-tls",
"smallvec",
"wayland-sys",
@ -5097,7 +5097,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f"
dependencies = [
"bitflags 2.5.0",
"rustix 0.38.32",
"rustix 0.38.34",
"wayland-backend",
"wayland-scanner",
]
@ -5119,7 +5119,7 @@ version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba"
dependencies = [
"rustix 0.38.32",
"rustix 0.38.34",
"wayland-client",
"xcursor",
]
@ -5170,7 +5170,7 @@ dependencies = [
"bitflags 2.5.0",
"downcast-rs",
"io-lifetimes 2.0.3",
"rustix 0.38.32",
"rustix 0.38.34",
"wayland-backend",
"wayland-scanner",
]
@ -5228,7 +5228,7 @@ dependencies = [
"naga",
"parking_lot 0.12.1",
"profiling",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"smallvec",
"static_assertions",
"wasm-bindgen",
@ -5255,7 +5255,7 @@ dependencies = [
"once_cell",
"parking_lot 0.12.1",
"profiling",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"rustc-hash",
"smallvec",
"thiserror",
@ -5296,7 +5296,7 @@ dependencies = [
"parking_lot 0.12.1",
"profiling",
"range-alloc",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"renderdoc-sys",
"rustc-hash",
"smallvec",
@ -5341,11 +5341,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
version = "0.1.6"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
checksum = "134306a13c5647ad6453e8deaec55d3a44d6021970129e6188735e74bf546697"
dependencies = [
"winapi",
"windows-sys 0.52.0",
]
[[package]]
@ -5365,7 +5365,7 @@ dependencies = [
"clipboard_x11",
"dnd",
"mime",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"thiserror",
]
@ -5556,7 +5556,7 @@ dependencies = [
"libc",
"libloading 0.8.3",
"once_cell",
"rustix 0.38.32",
"rustix 0.38.34",
"x11rb-protocol",
]
@ -5694,7 +5694,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9ff46f2a25abd690ed072054733e0bc3157e3d4c45f41bd183dce09c2ff8ab9"
dependencies = [
"async-broadcast 0.7.0",
"async-process 2.2.1",
"async-process 2.2.2",
"async-recursion",
"async-trait",
"derivative",

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(