refactor: use cctk
This commit is contained in:
parent
1b8a399ebd
commit
6e91eabf4c
46 changed files with 224 additions and 183 deletions
57
Cargo.lock
generated
57
Cargo.lock
generated
|
|
@ -1280,6 +1280,32 @@ dependencies = [
|
||||||
"libm",
|
"libm",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cosmic-client-toolkit"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://github.com/pop-os/cosmic-protocols?rev=27d70b6#27d70b6eb9c785a2a48341016f32a7b1ac4980ac"
|
||||||
|
dependencies = [
|
||||||
|
"cosmic-protocols",
|
||||||
|
"libc",
|
||||||
|
"smithay-client-toolkit 0.19.2",
|
||||||
|
"wayland-client",
|
||||||
|
"wayland-protocols 0.32.9",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cosmic-protocols"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://github.com/pop-os/cosmic-protocols?rev=27d70b6#27d70b6eb9c785a2a48341016f32a7b1ac4980ac"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.10.0",
|
||||||
|
"wayland-backend",
|
||||||
|
"wayland-client",
|
||||||
|
"wayland-protocols 0.32.9",
|
||||||
|
"wayland-protocols-wlr 0.3.9",
|
||||||
|
"wayland-scanner",
|
||||||
|
"wayland-server",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-text"
|
name = "cosmic-text"
|
||||||
version = "0.16.0"
|
version = "0.16.0"
|
||||||
|
|
@ -2960,6 +2986,7 @@ dependencies = [
|
||||||
"approx",
|
"approx",
|
||||||
"bitflags 2.10.0",
|
"bitflags 2.10.0",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
"cosmic-client-toolkit",
|
||||||
"dnd",
|
"dnd",
|
||||||
"glam",
|
"glam",
|
||||||
"iced_accessibility",
|
"iced_accessibility",
|
||||||
|
|
@ -2970,7 +2997,6 @@ dependencies = [
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
"serde",
|
"serde",
|
||||||
"smithay-client-toolkit 0.19.2",
|
|
||||||
"smol_str 0.3.2",
|
"smol_str 0.3.2",
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
"web-time",
|
"web-time",
|
||||||
|
|
@ -3064,6 +3090,7 @@ name = "iced_runtime"
|
||||||
version = "0.14.0"
|
version = "0.14.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
|
"cosmic-client-toolkit",
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_accessibility",
|
"iced_accessibility",
|
||||||
"iced_core",
|
"iced_core",
|
||||||
|
|
@ -3071,7 +3098,6 @@ dependencies = [
|
||||||
"iced_selector",
|
"iced_selector",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"sipper",
|
"sipper",
|
||||||
"smithay-client-toolkit 0.19.2",
|
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
"window_clipboard",
|
"window_clipboard",
|
||||||
]
|
]
|
||||||
|
|
@ -3131,6 +3157,7 @@ dependencies = [
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
"bitflags 2.10.0",
|
"bitflags 2.10.0",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
"cosmic-client-toolkit",
|
||||||
"cryoglyph",
|
"cryoglyph",
|
||||||
"futures",
|
"futures",
|
||||||
"glam",
|
"glam",
|
||||||
|
|
@ -3143,7 +3170,6 @@ dependencies = [
|
||||||
"resvg",
|
"resvg",
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
"rustix 0.38.44",
|
"rustix 0.38.44",
|
||||||
"smithay-client-toolkit 0.19.2",
|
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
"tiny-xlib",
|
"tiny-xlib",
|
||||||
"wayland-backend",
|
"wayland-backend",
|
||||||
|
|
@ -3158,6 +3184,7 @@ dependencies = [
|
||||||
name = "iced_widget"
|
name = "iced_widget"
|
||||||
version = "0.14.2"
|
version = "0.14.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"cosmic-client-toolkit",
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_accessibility",
|
"iced_accessibility",
|
||||||
"iced_highlighter",
|
"iced_highlighter",
|
||||||
|
|
@ -3169,7 +3196,6 @@ dependencies = [
|
||||||
"pulldown-cmark",
|
"pulldown-cmark",
|
||||||
"qrcode",
|
"qrcode",
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
"smithay-client-toolkit 0.19.2",
|
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
"unicode-segmentation",
|
"unicode-segmentation",
|
||||||
"window_clipboard",
|
"window_clipboard",
|
||||||
|
|
@ -3179,6 +3205,7 @@ dependencies = [
|
||||||
name = "iced_winit"
|
name = "iced_winit"
|
||||||
version = "0.14.0"
|
version = "0.14.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"cosmic-client-toolkit",
|
||||||
"cursor-icon",
|
"cursor-icon",
|
||||||
"dnd",
|
"dnd",
|
||||||
"iced_accessibility",
|
"iced_accessibility",
|
||||||
|
|
@ -3191,7 +3218,6 @@ dependencies = [
|
||||||
"mundy",
|
"mundy",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
"smithay-client-toolkit 0.19.2",
|
|
||||||
"sysinfo",
|
"sysinfo",
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
|
@ -5756,10 +5782,10 @@ dependencies = [
|
||||||
name = "sctk_drag"
|
name = "sctk_drag"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"cosmic-client-toolkit",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"iced",
|
"iced",
|
||||||
"iced_core",
|
"iced_core",
|
||||||
"smithay-client-toolkit 0.19.2",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -5785,12 +5811,12 @@ name = "sctk_subsurface"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"calloop 0.12.4",
|
"calloop 0.12.4",
|
||||||
|
"cosmic-client-toolkit",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"iced",
|
"iced",
|
||||||
"iced_runtime",
|
"iced_runtime",
|
||||||
"rustix 0.38.44",
|
"rustix 0.38.44",
|
||||||
"smithay-client-toolkit 0.18.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -5815,6 +5841,7 @@ name = "sctk_todos"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-std",
|
"async-std",
|
||||||
|
"cosmic-client-toolkit",
|
||||||
"directories-next",
|
"directories-next",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"iced",
|
"iced",
|
||||||
|
|
@ -5823,7 +5850,6 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"smithay-client-toolkit 0.19.2",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -7513,6 +7539,7 @@ dependencies = [
|
||||||
"wayland-backend",
|
"wayland-backend",
|
||||||
"wayland-client",
|
"wayland-client",
|
||||||
"wayland-scanner",
|
"wayland-scanner",
|
||||||
|
"wayland-server",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -7578,6 +7605,7 @@ dependencies = [
|
||||||
"wayland-client",
|
"wayland-client",
|
||||||
"wayland-protocols 0.32.9",
|
"wayland-protocols 0.32.9",
|
||||||
"wayland-scanner",
|
"wayland-scanner",
|
||||||
|
"wayland-server",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -7591,6 +7619,19 @@ dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wayland-server"
|
||||||
|
version = "0.31.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fcbd4f3aba6c9fba70445ad2a484c0ef0356c1a9459b1e8e435bedc1971a6222"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.10.0",
|
||||||
|
"downcast-rs",
|
||||||
|
"rustix 1.1.2",
|
||||||
|
"wayland-backend",
|
||||||
|
"wayland-scanner",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wayland-sys"
|
name = "wayland-sys"
|
||||||
version = "0.31.7"
|
version = "0.31.7"
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ wgpu-bare = ["iced_renderer/wgpu-bare", "iced_widget/wgpu"]
|
||||||
# Enables the `tiny-skia` software renderer
|
# Enables the `tiny-skia` software renderer
|
||||||
|
|
||||||
|
|
||||||
default = ["tiny-skia", "tokio"]
|
default = ["tiny-skia", "tokio", "wayland", "x11"]
|
||||||
# Enable the `tiny-skia` software renderer backend
|
# Enable the `tiny-skia` software renderer backend
|
||||||
tiny-skia = ["iced_renderer/tiny-skia"]
|
tiny-skia = ["iced_renderer/tiny-skia"]
|
||||||
# Enables the `image` widget
|
# Enables the `image` widget
|
||||||
|
|
@ -278,7 +278,7 @@ tiny-skia = { version = "0.11", default-features = false, features = [
|
||||||
"std",
|
"std",
|
||||||
"simd",
|
"simd",
|
||||||
] }
|
] }
|
||||||
sctk = { package = "smithay-client-toolkit", version = "0.19.1" }
|
cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "27d70b6" }
|
||||||
softbuffer = { git = "https://github.com/pop-os/softbuffer", tag = "cosmic-4.0" }
|
softbuffer = { git = "https://github.com/pop-os/softbuffer", tag = "cosmic-4.0" }
|
||||||
syntect = "5.2"
|
syntect = "5.2"
|
||||||
tokio = "1.0"
|
tokio = "1.0"
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ crisp = []
|
||||||
basic-shaping = []
|
basic-shaping = []
|
||||||
advanced-shaping = []
|
advanced-shaping = []
|
||||||
a11y = ["iced_accessibility"]
|
a11y = ["iced_accessibility"]
|
||||||
wayland = ["sctk"]
|
wayland = ["cctk"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags.workspace = true
|
bitflags.workspace = true
|
||||||
|
|
@ -42,8 +42,8 @@ window_clipboard.workspace = true
|
||||||
dnd.workspace = true
|
dnd.workspace = true
|
||||||
mime.workspace = true
|
mime.workspace = true
|
||||||
|
|
||||||
sctk.workspace = true
|
cctk.workspace = true
|
||||||
sctk.optional = true
|
cctk.optional = true
|
||||||
# /TODO(POP)
|
# /TODO(POP)
|
||||||
[dependencies.iced_accessibility]
|
[dependencies.iced_accessibility]
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ mod session_lock;
|
||||||
mod window;
|
mod window;
|
||||||
|
|
||||||
use crate::{time::Instant, window::Id};
|
use crate::{time::Instant, window::Id};
|
||||||
use sctk::reexports::client::protocol::{
|
use cctk::sctk::reexports::client::protocol::{
|
||||||
wl_output::WlOutput, wl_seat::WlSeat, wl_surface::WlSurface,
|
wl_output::WlOutput, wl_seat::WlSeat, wl_surface::WlSurface,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use sctk::output::OutputInfo;
|
use cctk::sctk::output::OutputInfo;
|
||||||
|
|
||||||
/// output events
|
/// output events
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::window::Id;
|
use crate::window::Id;
|
||||||
use sctk::reexports::client::protocol::wl_surface::WlSurface;
|
use cctk::sctk::reexports::client::protocol::wl_surface::WlSurface;
|
||||||
|
|
||||||
/// session lock events
|
/// session lock events
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,4 @@ iced = { path = "../..", default-features = false, features = [
|
||||||
] }
|
] }
|
||||||
env_logger = "0.10"
|
env_logger = "0.10"
|
||||||
# sctk = { package = "smithay-client-toolkit", path = "../../../fork/client-toolkit/" }
|
# sctk = { package = "smithay-client-toolkit", path = "../../../fork/client-toolkit/" }
|
||||||
sctk.workspace = true
|
cctk.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sctk = { package = "smithay-client-toolkit", git = "https://github.com/smithay/client-toolkit", rev = "828b1eb" }
|
# sctk = { package = "smithay-client-toolkit", git = "https://github.com/smithay/client-toolkit", rev = "828b1eb" }
|
||||||
iced = { path = "../..", default-features = false, features = [
|
iced = { path = "../..", default-features = false, features = [
|
||||||
"tokio",
|
"tokio",
|
||||||
"wayland",
|
"wayland",
|
||||||
|
|
@ -17,3 +17,4 @@ env_logger = "0.10"
|
||||||
futures-channel = "0.3.29"
|
futures-channel = "0.3.29"
|
||||||
calloop = "0.12.3"
|
calloop = "0.12.3"
|
||||||
rustix = { version = "0.38.30", features = ["fs", "shm"] }
|
rustix = { version = "0.38.30", features = ["fs", "shm"] }
|
||||||
|
cctk.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use iced::{
|
||||||
window::{self, Id, Settings},
|
window::{self, Id, Settings},
|
||||||
Element, Length, Subscription, Task,
|
Element, Length, Subscription, Task,
|
||||||
};
|
};
|
||||||
use sctk::reexports::client::{Connection, Proxy};
|
use cctk::sctk::reexports::client::{Connection, Proxy};
|
||||||
|
|
||||||
mod wayland;
|
mod wayland;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use iced::{
|
||||||
};
|
};
|
||||||
use iced_runtime::futures::subscription;
|
use iced_runtime::futures::subscription;
|
||||||
use rustix::{io::Errno, shm::ShmOFlags};
|
use rustix::{io::Errno, shm::ShmOFlags};
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
reexports::{
|
reexports::{
|
||||||
calloop_wayland_source::WaylandSource,
|
calloop_wayland_source::WaylandSource,
|
||||||
client::{
|
client::{
|
||||||
|
|
@ -40,7 +40,7 @@ impl ProvidesRegistryState for AppData {
|
||||||
&mut self.registry_state
|
&mut self.registry_state
|
||||||
}
|
}
|
||||||
|
|
||||||
sctk::registry_handlers!();
|
cctk::sctk::registry_handlers!();
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ShmHandler for AppData {
|
impl ShmHandler for AppData {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
iced_core.workspace = true
|
iced_core.workspace = true
|
||||||
once_cell = "1.15"
|
once_cell = "1.15"
|
||||||
sctk.workspace = true
|
cctk.workspace = true
|
||||||
log = "0.4.17"
|
log = "0.4.17"
|
||||||
env_logger = "0.10.0"
|
env_logger = "0.10.0"
|
||||||
async-std = "1.0"
|
async-std = "1.0"
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ impl Todos {
|
||||||
get_layer_surface(iced::platform_specific::runtime::wayland::layer_surface::SctkLayerSurfaceSettings {
|
get_layer_surface(iced::platform_specific::runtime::wayland::layer_surface::SctkLayerSurfaceSettings {
|
||||||
size: Some((None, Some(500))),
|
size: Some((None, Some(500))),
|
||||||
pointer_interactivity: true,
|
pointer_interactivity: true,
|
||||||
keyboard_interactivity: sctk::shell::wlr_layer::KeyboardInteractivity::OnDemand,
|
keyboard_interactivity: cctk::sctk::shell::wlr_layer::KeyboardInteractivity::OnDemand,
|
||||||
anchor: Anchor::LEFT.union(Anchor::RIGHT).union(Anchor::TOP),
|
anchor: Anchor::LEFT.union(Anchor::RIGHT).union(Anchor::TOP),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ debug = []
|
||||||
selector = ["dep:iced_selector"]
|
selector = ["dep:iced_selector"]
|
||||||
multi-window = []
|
multi-window = []
|
||||||
a11y = ["iced_accessibility", "iced_core/a11y"]
|
a11y = ["iced_accessibility", "iced_core/a11y"]
|
||||||
wayland = ["iced_core/wayland", "sctk"]
|
wayland = ["iced_core/wayland", "cctk"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytes.workspace = true
|
bytes.workspace = true
|
||||||
|
|
@ -34,8 +34,8 @@ sipper.optional = true
|
||||||
iced_selector.workspace = true
|
iced_selector.workspace = true
|
||||||
iced_selector.optional = true
|
iced_selector.optional = true
|
||||||
iced_futures.features = ["thread-pool"]
|
iced_futures.features = ["thread-pool"]
|
||||||
sctk.workspace = true
|
cctk.workspace = true
|
||||||
sctk.optional = true
|
cctk.optional = true
|
||||||
iced_accessibility.workspace = true
|
iced_accessibility.workspace = true
|
||||||
iced_accessibility.optional = true
|
iced_accessibility.optional = true
|
||||||
window_clipboard.workspace = true
|
window_clipboard.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
use iced_core::layout::Limits;
|
use iced_core::layout::Limits;
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
reexports::client::protocol::wl_output::WlOutput,
|
reexports::client::protocol::wl_output::WlOutput,
|
||||||
shell::wlr_layer::{Anchor, KeyboardInteractivity, Layer},
|
shell::wlr_layer::{Anchor, KeyboardInteractivity, Layer},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use std::hash::{Hash, Hasher};
|
||||||
use iced_core::layout::Limits;
|
use iced_core::layout::Limits;
|
||||||
use iced_core::window::Id;
|
use iced_core::window::Id;
|
||||||
use iced_core::Rectangle;
|
use iced_core::Rectangle;
|
||||||
use sctk::reexports::protocols::xdg::shell::client::xdg_positioner::{
|
use cctk::sctk::reexports::protocols::xdg::shell::client::xdg_positioner::{
|
||||||
Anchor, Gravity,
|
Anchor, Gravity,
|
||||||
};
|
};
|
||||||
/// Popup creation details
|
/// Popup creation details
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ use std::fmt;
|
||||||
|
|
||||||
use iced_core::window::Id;
|
use iced_core::window::Id;
|
||||||
|
|
||||||
use sctk::reexports::client::protocol::wl_output::WlOutput;
|
use cctk::sctk::reexports::client::protocol::wl_output::WlOutput;
|
||||||
|
|
||||||
/// Session lock action
|
/// Session lock action
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ resvg.optional = true
|
||||||
|
|
||||||
rustix = { version = "0.38" }
|
rustix = { version = "0.38" }
|
||||||
raw-window-handle.workspace = true
|
raw-window-handle.workspace = true
|
||||||
sctk.workspace = true
|
cctk.workspace = true
|
||||||
wayland-protocols.workspace = true
|
wayland-protocols.workspace = true
|
||||||
wayland-backend = { version = "0.3.3", features = ["client_system"] }
|
wayland-backend = { version = "0.3.3", features = ["client_system"] }
|
||||||
wayland-client = { version = "0.31.2" }
|
wayland-client = { version = "0.31.2" }
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
use crate::graphics::compositor::Window;
|
use crate::graphics::compositor::Window;
|
||||||
use raw_window_handle::{RawDisplayHandle, WaylandDisplayHandle};
|
use cctk::sctk::{
|
||||||
use sctk::{
|
|
||||||
dmabuf::{DmabufFeedback, DmabufHandler, DmabufState},
|
dmabuf::{DmabufFeedback, DmabufHandler, DmabufState},
|
||||||
registry::{ProvidesRegistryState, RegistryState},
|
registry::{ProvidesRegistryState, RegistryState},
|
||||||
registry_handlers,
|
registry_handlers,
|
||||||
};
|
};
|
||||||
|
use raw_window_handle::{RawDisplayHandle, WaylandDisplayHandle};
|
||||||
use wayland_client::{
|
use wayland_client::{
|
||||||
backend::Backend, globals::registry_queue_init, protocol::wl_buffer,
|
backend::Backend, globals::registry_queue_init, protocol::wl_buffer,
|
||||||
Connection, QueueHandle,
|
Connection, QueueHandle,
|
||||||
|
|
@ -111,5 +111,5 @@ pub fn get_wayland_device_ids<W: Window>(window: &W) -> Option<(u16, u16)> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sctk::delegate_dmabuf!(AppData);
|
cctk::sctk::delegate_dmabuf!(AppData);
|
||||||
sctk::delegate_registry!(AppData);
|
cctk::sctk::delegate_registry!(AppData);
|
||||||
|
|
|
||||||
|
|
@ -29,15 +29,15 @@ highlighter = ["dep:iced_highlighter"]
|
||||||
advanced = []
|
advanced = []
|
||||||
crisp = []
|
crisp = []
|
||||||
a11y = ["iced_accessibility"]
|
a11y = ["iced_accessibility"]
|
||||||
wayland = ["sctk", "iced_runtime/wayland"]
|
wayland = ["cctk", "iced_runtime/wayland"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced_renderer.workspace = true
|
iced_renderer.workspace = true
|
||||||
iced_runtime.workspace = true
|
iced_runtime.workspace = true
|
||||||
iced_accessibility.workspace = true
|
iced_accessibility.workspace = true
|
||||||
iced_accessibility.optional = true
|
iced_accessibility.optional = true
|
||||||
sctk.workspace = true
|
cctk.workspace = true
|
||||||
sctk.optional = true
|
cctk.optional = true
|
||||||
num-traits.workspace = true
|
num-traits.workspace = true
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ workspace = true
|
||||||
[features]
|
[features]
|
||||||
wayland = [
|
wayland = [
|
||||||
"winit/wayland",
|
"winit/wayland",
|
||||||
"sctk",
|
"cctk",
|
||||||
"wayland-protocols",
|
"wayland-protocols",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"iced_runtime/wayland",
|
"iced_runtime/wayland",
|
||||||
|
|
@ -69,8 +69,8 @@ mundy.workspace = true
|
||||||
mundy.optional = true
|
mundy.optional = true
|
||||||
|
|
||||||
raw-window-handle = { version = "0.6", optional = true }
|
raw-window-handle = { version = "0.6", optional = true }
|
||||||
sctk.workspace = true
|
cctk.workspace = true
|
||||||
sctk.optional = true
|
cctk.optional = true
|
||||||
wayland-protocols.workspace = true
|
wayland-protocols.workspace = true
|
||||||
wayland-protocols.optional = true
|
wayland-protocols.optional = true
|
||||||
wayland-backend = { version = "0.3.1", features = [
|
wayland-backend = { version = "0.3.1", features = [
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||||
|
use cctk::sctk::reexports::client::Connection;
|
||||||
use iced_graphics::{Compositor, compositor};
|
use iced_graphics::{Compositor, compositor};
|
||||||
use iced_runtime::{core::window, platform_specific, user_interface};
|
use iced_runtime::{core::window, platform_specific, user_interface};
|
||||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
|
||||||
use sctk::reexports::client::Connection;
|
|
||||||
|
|
||||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||||
pub mod wayland;
|
pub mod wayland;
|
||||||
|
|
@ -79,7 +79,7 @@ impl PlatformSpecific {
|
||||||
) {
|
) {
|
||||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||||
{
|
{
|
||||||
use sctk::reexports::client::{
|
use cctk::sctk::reexports::client::{
|
||||||
Proxy, protocol::wl_surface::WlSurface,
|
Proxy, protocol::wl_surface::WlSurface,
|
||||||
};
|
};
|
||||||
use wayland_backend::client::ObjectId;
|
use wayland_backend::client::ObjectId;
|
||||||
|
|
@ -99,7 +99,9 @@ impl PlatformSpecific {
|
||||||
wayland_display_handle.display.as_ptr().cast(),
|
wayland_display_handle.display.as_ptr().cast(),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
sctk::reexports::client::Connection::from_backend(backend)
|
cctk::sctk::reexports::client::Connection::from_backend(
|
||||||
|
backend,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ use iced_runtime::{
|
||||||
task, Action, Task,
|
task, Action, Task,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub use sctk::shell::wlr_layer::{Anchor, KeyboardInteractivity, Layer};
|
pub use cctk::sctk::shell::wlr_layer::{Anchor, KeyboardInteractivity, Layer};
|
||||||
|
|
||||||
// TODO ASHLEY: maybe implement as builder that outputs a batched commands
|
// TODO ASHLEY: maybe implement as builder that outputs a batched commands
|
||||||
/// <https://wayland.app/protocols/wlr-layer-shell-unstable-v1#zwlr_layer_shell_v1:request:get_layer_surface>
|
/// <https://wayland.app/protocols/wlr-layer-shell-unstable-v1#zwlr_layer_shell_v1:request:get_layer_surface>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use iced_runtime::{
|
||||||
platform_specific::{self, wayland},
|
platform_specific::{self, wayland},
|
||||||
task, Action, Task,
|
task, Action, Task,
|
||||||
};
|
};
|
||||||
use sctk::reexports::client::protocol::wl_output::WlOutput;
|
use cctk::sctk::reexports::client::protocol::wl_output::WlOutput;
|
||||||
|
|
||||||
pub fn lock<Message>() -> Task<Message> {
|
pub fn lock<Message>() -> Task<Message> {
|
||||||
task::effect(Action::PlatformSpecific(
|
task::effect(Action::PlatformSpecific(
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
use iced_runtime::core::{
|
use cctk::sctk::{
|
||||||
keyboard,
|
|
||||||
mouse::{self, ScrollDelta},
|
|
||||||
};
|
|
||||||
use sctk::{
|
|
||||||
reexports::client::protocol::wl_pointer::AxisSource,
|
reexports::client::protocol::wl_pointer::AxisSource,
|
||||||
seat::{
|
seat::{
|
||||||
keyboard::Modifiers,
|
keyboard::Modifiers,
|
||||||
|
|
@ -11,6 +7,10 @@ use sctk::{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
use iced_runtime::core::{
|
||||||
|
keyboard,
|
||||||
|
mouse::{self, ScrollDelta},
|
||||||
|
};
|
||||||
|
|
||||||
/// An error that occurred while running an application.
|
/// An error that occurred while running an application.
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ use crate::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use raw_window_handle::HasDisplayHandle;
|
use raw_window_handle::HasDisplayHandle;
|
||||||
use sctk::reexports::calloop_wayland_source::WaylandSource;
|
use cctk::sctk::reexports::calloop_wayland_source::WaylandSource;
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
activation::ActivationState,
|
activation::ActivationState,
|
||||||
compositor::CompositorState,
|
compositor::CompositorState,
|
||||||
globals::GlobalData,
|
globals::GlobalData,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ use iced_futures::futures::{
|
||||||
task::{Context, Poll},
|
task::{Context, Poll},
|
||||||
Sink,
|
Sink,
|
||||||
};
|
};
|
||||||
use sctk::reexports::calloop;
|
use cctk::sctk::reexports::calloop;
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
|
|
||||||
/// An event loop proxy that implements `Sink`.
|
/// An event loop proxy that implements `Sink`.
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ use iced_runtime::{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
activation::{ActivationState, RequestData},
|
activation::{ActivationState, RequestData},
|
||||||
compositor::CompositorState,
|
compositor::CompositorState,
|
||||||
error::GlobalError,
|
error::GlobalError,
|
||||||
|
|
@ -980,7 +980,7 @@ impl SctkState {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if self.pending_popup.replace((popup, 0)).is_none() {
|
if self.pending_popup.replace((popup, 0)).is_none() {
|
||||||
let timer = sctk::reexports::calloop::timer::Timer::from_duration(Duration::from_millis(30));
|
let timer = cctk::sctk::reexports::calloop::timer::Timer::from_duration(Duration::from_millis(30));
|
||||||
let queue_handle = self.queue_handle.clone();
|
let queue_handle = self.queue_handle.clone();
|
||||||
_ = self.loop_handle.insert_source(timer, move |_, _, state| {
|
_ = self.loop_handle.insert_source(timer, move |_, _, state| {
|
||||||
let Some((popup, attempt)) = state.pending_popup.take() else {
|
let Some((popup, attempt)) = state.pending_popup.take() else {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use iced_futures::futures::channel::oneshot::Sender;
|
use iced_futures::futures::channel::oneshot::Sender;
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
activation::{ActivationHandler, RequestData, RequestDataExt},
|
activation::{ActivationHandler, RequestData, RequestDataExt},
|
||||||
delegate_activation,
|
delegate_activation,
|
||||||
reexports::client::protocol::{wl_seat::WlSeat, wl_surface::WlSurface},
|
reexports::client::protocol::{wl_seat::WlSeat, wl_surface::WlSurface},
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// SPDX-License-Identifier: MPL-2.0-only
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
compositor::CompositorHandler,
|
compositor::CompositorHandler,
|
||||||
delegate_compositor,
|
delegate_compositor,
|
||||||
reexports::client::{
|
reexports::client::{
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
pub mod activation;
|
pub mod activation;
|
||||||
pub mod compositor;
|
pub mod compositor;
|
||||||
pub mod output;
|
pub mod output;
|
||||||
|
// pub mod overlap;
|
||||||
pub mod seat;
|
pub mod seat;
|
||||||
pub mod session_lock;
|
pub mod session_lock;
|
||||||
pub mod shell;
|
pub mod shell;
|
||||||
|
|
@ -9,7 +10,7 @@ pub mod subcompositor;
|
||||||
pub mod wp_fractional_scaling;
|
pub mod wp_fractional_scaling;
|
||||||
pub mod wp_viewporter;
|
pub mod wp_viewporter;
|
||||||
|
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
delegate_registry, delegate_shm,
|
delegate_registry, delegate_shm,
|
||||||
output::OutputState,
|
output::OutputState,
|
||||||
registry::{ProvidesRegistryState, RegistryState},
|
registry::{ProvidesRegistryState, RegistryState},
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
use crate::platform_specific::wayland::{
|
use crate::platform_specific::wayland::{
|
||||||
event_loop::state::SctkState, sctk_event::SctkEvent,
|
event_loop::state::SctkState, sctk_event::SctkEvent,
|
||||||
};
|
};
|
||||||
use sctk::{delegate_output, output::OutputHandler};
|
use cctk::sctk::{delegate_output, output::OutputHandler};
|
||||||
|
|
||||||
impl OutputHandler for SctkState {
|
impl OutputHandler for SctkState {
|
||||||
fn output_state(&mut self) -> &mut sctk::output::OutputState {
|
fn output_state(&mut self) -> &mut cctk::sctk::output::OutputState {
|
||||||
&mut self.output_state
|
&mut self.output_state
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_output(
|
fn new_output(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
output: sctk::reexports::client::protocol::wl_output::WlOutput,
|
output: cctk::sctk::reexports::client::protocol::wl_output::WlOutput,
|
||||||
) {
|
) {
|
||||||
self.sctk_events.push(SctkEvent::NewOutput {
|
self.sctk_events.push(SctkEvent::NewOutput {
|
||||||
id: output.clone(),
|
id: output.clone(),
|
||||||
|
|
@ -23,9 +23,9 @@ impl OutputHandler for SctkState {
|
||||||
|
|
||||||
fn update_output(
|
fn update_output(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
output: sctk::reexports::client::protocol::wl_output::WlOutput,
|
output: cctk::sctk::reexports::client::protocol::wl_output::WlOutput,
|
||||||
) {
|
) {
|
||||||
if let Some(info) = self.output_state.info(&output) {
|
if let Some(info) = self.output_state.info(&output) {
|
||||||
self.sctk_events.push(SctkEvent::UpdateOutput {
|
self.sctk_events.push(SctkEvent::UpdateOutput {
|
||||||
|
|
@ -37,9 +37,9 @@ impl OutputHandler for SctkState {
|
||||||
|
|
||||||
fn output_destroyed(
|
fn output_destroyed(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
output: sctk::reexports::client::protocol::wl_output::WlOutput,
|
output: cctk::sctk::reexports::client::protocol::wl_output::WlOutput,
|
||||||
) {
|
) {
|
||||||
self.sctk_events.push(SctkEvent::RemovedOutput(output));
|
self.sctk_events.push(SctkEvent::RemovedOutput(output));
|
||||||
// TODO clean up any layer surfaces on this output?
|
// TODO clean up any layer surfaces on this output?
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ use crate::platform_specific::wayland::{
|
||||||
event_loop::state::SctkState,
|
event_loop::state::SctkState,
|
||||||
sctk_event::{KeyboardEventVariant, SctkEvent},
|
sctk_event::{KeyboardEventVariant, SctkEvent},
|
||||||
};
|
};
|
||||||
use sctk::reexports::client::Proxy;
|
use cctk::sctk::reexports::client::Proxy;
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
delegate_keyboard,
|
delegate_keyboard,
|
||||||
seat::keyboard::{KeyboardHandler, Keysym},
|
seat::keyboard::{KeyboardHandler, Keysym},
|
||||||
};
|
};
|
||||||
|
|
@ -11,10 +11,10 @@ use sctk::{
|
||||||
impl KeyboardHandler for SctkState {
|
impl KeyboardHandler for SctkState {
|
||||||
fn enter(
|
fn enter(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
keyboard: &sctk::reexports::client::protocol::wl_keyboard::WlKeyboard,
|
keyboard: &cctk::sctk::reexports::client::protocol::wl_keyboard::WlKeyboard,
|
||||||
surface: &sctk::reexports::client::protocol::wl_surface::WlSurface,
|
surface: &cctk::sctk::reexports::client::protocol::wl_surface::WlSurface,
|
||||||
_serial: u32,
|
_serial: u32,
|
||||||
_raw: &[u32],
|
_raw: &[u32],
|
||||||
_keysyms: &[Keysym],
|
_keysyms: &[Keysym],
|
||||||
|
|
@ -57,20 +57,20 @@ impl KeyboardHandler for SctkState {
|
||||||
winit::event::WindowEvent::Focused(true),
|
winit::event::WindowEvent::Focused(true),
|
||||||
));
|
));
|
||||||
self.sctk_events.push(SctkEvent::KeyboardEvent {
|
self.sctk_events.push(SctkEvent::KeyboardEvent {
|
||||||
variant: KeyboardEventVariant::Enter(surface.clone()),
|
variant: KeyboardEventVariant::Enter(surface.clone()),
|
||||||
kbd_id: keyboard.clone(),
|
kbd_id: keyboard.clone(),
|
||||||
seat_id: seat,
|
seat_id: seat,
|
||||||
surface: surface.clone(),
|
surface: surface.clone(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn leave(
|
fn leave(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
keyboard: &sctk::reexports::client::protocol::wl_keyboard::WlKeyboard,
|
keyboard: &cctk::sctk::reexports::client::protocol::wl_keyboard::WlKeyboard,
|
||||||
surface: &sctk::reexports::client::protocol::wl_surface::WlSurface,
|
surface: &cctk::sctk::reexports::client::protocol::wl_surface::WlSurface,
|
||||||
_serial: u32,
|
_serial: u32,
|
||||||
) {
|
) {
|
||||||
self.request_redraw(surface);
|
self.request_redraw(surface);
|
||||||
|
|
@ -129,11 +129,11 @@ impl KeyboardHandler for SctkState {
|
||||||
|
|
||||||
fn press_key(
|
fn press_key(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
keyboard: &sctk::reexports::client::protocol::wl_keyboard::WlKeyboard,
|
keyboard: &cctk::sctk::reexports::client::protocol::wl_keyboard::WlKeyboard,
|
||||||
serial: u32,
|
serial: u32,
|
||||||
event: sctk::seat::keyboard::KeyEvent,
|
event: cctk::sctk::seat::keyboard::KeyEvent,
|
||||||
) {
|
) {
|
||||||
let (is_active, my_seat) =
|
let (is_active, my_seat) =
|
||||||
match self.seats.iter_mut().enumerate().find_map(|(i, s)| {
|
match self.seats.iter_mut().enumerate().find_map(|(i, s)| {
|
||||||
|
|
@ -185,11 +185,11 @@ impl KeyboardHandler for SctkState {
|
||||||
|
|
||||||
fn release_key(
|
fn release_key(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
keyboard: &sctk::reexports::client::protocol::wl_keyboard::WlKeyboard,
|
keyboard: &cctk::sctk::reexports::client::protocol::wl_keyboard::WlKeyboard,
|
||||||
_serial: u32,
|
_serial: u32,
|
||||||
event: sctk::seat::keyboard::KeyEvent,
|
event: cctk::sctk::seat::keyboard::KeyEvent,
|
||||||
) {
|
) {
|
||||||
let (is_active, my_seat) =
|
let (is_active, my_seat) =
|
||||||
match self.seats.iter_mut().enumerate().find_map(|(i, s)| {
|
match self.seats.iter_mut().enumerate().find_map(|(i, s)| {
|
||||||
|
|
@ -220,11 +220,11 @@ impl KeyboardHandler for SctkState {
|
||||||
|
|
||||||
fn update_modifiers(
|
fn update_modifiers(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
keyboard: &sctk::reexports::client::protocol::wl_keyboard::WlKeyboard,
|
keyboard: &cctk::sctk::reexports::client::protocol::wl_keyboard::WlKeyboard,
|
||||||
_serial: u32,
|
_serial: u32,
|
||||||
modifiers: sctk::seat::keyboard::Modifiers,
|
modifiers: cctk::sctk::seat::keyboard::Modifiers,
|
||||||
layout: u32,
|
layout: u32,
|
||||||
) {
|
) {
|
||||||
let (is_active, my_seat) =
|
let (is_active, my_seat) =
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use crate::{
|
||||||
event_loop::state::SctkState, sctk_event::SctkEvent,
|
event_loop::state::SctkState, sctk_event::SctkEvent,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
delegate_pointer,
|
delegate_pointer,
|
||||||
reexports::client::Proxy,
|
reexports::client::Proxy,
|
||||||
seat::pointer::{
|
seat::pointer::{
|
||||||
|
|
@ -22,10 +22,10 @@ use winit::{
|
||||||
impl PointerHandler for SctkState {
|
impl PointerHandler for SctkState {
|
||||||
fn pointer_frame(
|
fn pointer_frame(
|
||||||
&mut self,
|
&mut self,
|
||||||
conn: &sctk::reexports::client::Connection,
|
conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
pointer: &sctk::reexports::client::protocol::wl_pointer::WlPointer,
|
pointer: &cctk::sctk::reexports::client::protocol::wl_pointer::WlPointer,
|
||||||
events: &[sctk::seat::pointer::PointerEvent],
|
events: &[cctk::sctk::seat::pointer::PointerEvent],
|
||||||
) {
|
) {
|
||||||
let (is_active, my_seat) =
|
let (is_active, my_seat) =
|
||||||
match self.seats.iter_mut().enumerate().find_map(|(i, s)| {
|
match self.seats.iter_mut().enumerate().find_map(|(i, s)| {
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,23 @@ use crate::platform_specific::wayland::{
|
||||||
event_loop::{state::SctkSeat, state::SctkState},
|
event_loop::{state::SctkSeat, state::SctkState},
|
||||||
sctk_event::{KeyboardEventVariant, SctkEvent, SeatEventVariant},
|
sctk_event::{KeyboardEventVariant, SctkEvent, SeatEventVariant},
|
||||||
};
|
};
|
||||||
use iced_runtime::keyboard::Modifiers;
|
use cctk::sctk::{
|
||||||
use sctk::{
|
|
||||||
delegate_seat,
|
delegate_seat,
|
||||||
reexports::client::{protocol::wl_keyboard::WlKeyboard, Proxy},
|
reexports::client::{protocol::wl_keyboard::WlKeyboard, Proxy},
|
||||||
seat::{pointer::ThemeSpec, SeatHandler},
|
seat::{pointer::ThemeSpec, SeatHandler},
|
||||||
};
|
};
|
||||||
|
use iced_runtime::keyboard::Modifiers;
|
||||||
|
|
||||||
impl SeatHandler for SctkState {
|
impl SeatHandler for SctkState {
|
||||||
fn seat_state(&mut self) -> &mut sctk::seat::SeatState {
|
fn seat_state(&mut self) -> &mut cctk::sctk::seat::SeatState {
|
||||||
&mut self.seat_state
|
&mut self.seat_state
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_seat(
|
fn new_seat(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
qh: &sctk::reexports::client::QueueHandle<Self>,
|
qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
seat: sctk::reexports::client::protocol::wl_seat::WlSeat,
|
seat: cctk::sctk::reexports::client::protocol::wl_seat::WlSeat,
|
||||||
) {
|
) {
|
||||||
self.sctk_events.push(SctkEvent::SeatEvent {
|
self.sctk_events.push(SctkEvent::SeatEvent {
|
||||||
variant: SeatEventVariant::New,
|
variant: SeatEventVariant::New,
|
||||||
|
|
@ -43,10 +43,10 @@ impl SeatHandler for SctkState {
|
||||||
|
|
||||||
fn new_capability(
|
fn new_capability(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
qh: &sctk::reexports::client::QueueHandle<Self>,
|
qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
seat: sctk::reexports::client::protocol::wl_seat::WlSeat,
|
seat: cctk::sctk::reexports::client::protocol::wl_seat::WlSeat,
|
||||||
capability: sctk::seat::Capability,
|
capability: cctk::sctk::seat::Capability,
|
||||||
) {
|
) {
|
||||||
let my_seat = match self.seats.iter_mut().find(|s| s.seat == seat) {
|
let my_seat = match self.seats.iter_mut().find(|s| s.seat == seat) {
|
||||||
Some(s) => s,
|
Some(s) => s,
|
||||||
|
|
@ -71,7 +71,7 @@ impl SeatHandler for SctkState {
|
||||||
};
|
};
|
||||||
// TODO data device
|
// TODO data device
|
||||||
match capability {
|
match capability {
|
||||||
sctk::seat::Capability::Keyboard => {
|
cctk::sctk::seat::Capability::Keyboard => {
|
||||||
let seat_clone = seat.clone();
|
let seat_clone = seat.clone();
|
||||||
let seat_clone_2 = seat.clone();
|
let seat_clone_2 = seat.clone();
|
||||||
if let Ok(kbd) = self.seat_state.get_keyboard_with_repeat(
|
if let Ok(kbd) = self.seat_state.get_keyboard_with_repeat(
|
||||||
|
|
@ -107,7 +107,7 @@ impl SeatHandler for SctkState {
|
||||||
_ = my_seat.kbd.replace(kbd);
|
_ = my_seat.kbd.replace(kbd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sctk::seat::Capability::Pointer => {
|
cctk::sctk::seat::Capability::Pointer => {
|
||||||
let surface = self.compositor_state.create_surface(qh);
|
let surface = self.compositor_state.create_surface(qh);
|
||||||
|
|
||||||
if let Ok(ptr) = self.seat_state.get_pointer_with_theme(
|
if let Ok(ptr) = self.seat_state.get_pointer_with_theme(
|
||||||
|
|
@ -127,7 +127,7 @@ impl SeatHandler for SctkState {
|
||||||
_ = my_seat.ptr.replace(ptr);
|
_ = my_seat.ptr.replace(ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sctk::seat::Capability::Touch => {
|
cctk::sctk::seat::Capability::Touch => {
|
||||||
if let Some(touch) = self.seat_state.get_touch(qh, &seat).ok() {
|
if let Some(touch) = self.seat_state.get_touch(qh, &seat).ok() {
|
||||||
self.sctk_events.push(SctkEvent::SeatEvent {
|
self.sctk_events.push(SctkEvent::SeatEvent {
|
||||||
variant: SeatEventVariant::NewCapability(
|
variant: SeatEventVariant::NewCapability(
|
||||||
|
|
@ -145,10 +145,10 @@ impl SeatHandler for SctkState {
|
||||||
|
|
||||||
fn remove_capability(
|
fn remove_capability(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
seat: sctk::reexports::client::protocol::wl_seat::WlSeat,
|
seat: cctk::sctk::reexports::client::protocol::wl_seat::WlSeat,
|
||||||
capability: sctk::seat::Capability,
|
capability: cctk::sctk::seat::Capability,
|
||||||
) {
|
) {
|
||||||
let my_seat = match self.seats.iter_mut().find(|s| s.seat == seat) {
|
let my_seat = match self.seats.iter_mut().find(|s| s.seat == seat) {
|
||||||
Some(s) => s,
|
Some(s) => s,
|
||||||
|
|
@ -158,7 +158,7 @@ impl SeatHandler for SctkState {
|
||||||
// TODO data device
|
// TODO data device
|
||||||
match capability {
|
match capability {
|
||||||
// TODO use repeating kbd?
|
// TODO use repeating kbd?
|
||||||
sctk::seat::Capability::Keyboard => {
|
cctk::sctk::seat::Capability::Keyboard => {
|
||||||
if let Some(kbd) = my_seat.kbd.take() {
|
if let Some(kbd) = my_seat.kbd.take() {
|
||||||
self.sctk_events.push(SctkEvent::SeatEvent {
|
self.sctk_events.push(SctkEvent::SeatEvent {
|
||||||
variant: SeatEventVariant::RemoveCapability(
|
variant: SeatEventVariant::RemoveCapability(
|
||||||
|
|
@ -169,7 +169,7 @@ impl SeatHandler for SctkState {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sctk::seat::Capability::Pointer => {
|
cctk::sctk::seat::Capability::Pointer => {
|
||||||
if let Some(ptr) = my_seat.ptr.take() {
|
if let Some(ptr) = my_seat.ptr.take() {
|
||||||
self.sctk_events.push(SctkEvent::SeatEvent {
|
self.sctk_events.push(SctkEvent::SeatEvent {
|
||||||
variant: SeatEventVariant::RemoveCapability(
|
variant: SeatEventVariant::RemoveCapability(
|
||||||
|
|
@ -180,7 +180,7 @@ impl SeatHandler for SctkState {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sctk::seat::Capability::Touch => {
|
cctk::sctk::seat::Capability::Touch => {
|
||||||
if let Some(touch) = my_seat.touch.take() {
|
if let Some(touch) = my_seat.touch.take() {
|
||||||
self.sctk_events.push(SctkEvent::SeatEvent {
|
self.sctk_events.push(SctkEvent::SeatEvent {
|
||||||
variant: SeatEventVariant::RemoveCapability(
|
variant: SeatEventVariant::RemoveCapability(
|
||||||
|
|
@ -197,9 +197,9 @@ impl SeatHandler for SctkState {
|
||||||
|
|
||||||
fn remove_seat(
|
fn remove_seat(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
seat: sctk::reexports::client::protocol::wl_seat::WlSeat,
|
seat: cctk::sctk::reexports::client::protocol::wl_seat::WlSeat,
|
||||||
) {
|
) {
|
||||||
self.sctk_events.push(SctkEvent::SeatEvent {
|
self.sctk_events.push(SctkEvent::SeatEvent {
|
||||||
variant: SeatEventVariant::Remove,
|
variant: SeatEventVariant::Remove,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use crate::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use iced_runtime::core::{touch, Point};
|
use iced_runtime::core::{touch, Point};
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
delegate_touch,
|
delegate_touch,
|
||||||
reexports::client::{
|
reexports::client::{
|
||||||
protocol::{wl_surface::WlSurface, wl_touch::WlTouch},
|
protocol::{wl_surface::WlSurface, wl_touch::WlTouch},
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::platform_specific::wayland::{
|
use crate::platform_specific::wayland::{
|
||||||
handlers::SctkState, sctk_event::SctkEvent,
|
handlers::SctkState, sctk_event::SctkEvent,
|
||||||
};
|
};
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
delegate_session_lock,
|
delegate_session_lock,
|
||||||
reexports::client::{Connection, QueueHandle},
|
reexports::client::{Connection, QueueHandle},
|
||||||
session_lock::{
|
session_lock::{
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ use crate::platform_specific::wayland::{
|
||||||
event_loop::state::SctkState,
|
event_loop::state::SctkState,
|
||||||
sctk_event::{LayerSurfaceEventVariant, SctkEvent},
|
sctk_event::{LayerSurfaceEventVariant, SctkEvent},
|
||||||
};
|
};
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
delegate_layer,
|
delegate_layer,
|
||||||
reexports::client::Proxy,
|
reexports::client::Proxy,
|
||||||
shell::{
|
shell::{
|
||||||
|
|
@ -16,9 +16,9 @@ use winit::dpi::LogicalSize;
|
||||||
impl LayerShellHandler for SctkState {
|
impl LayerShellHandler for SctkState {
|
||||||
fn closed(
|
fn closed(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
layer: &sctk::shell::wlr_layer::LayerSurface,
|
layer: &cctk::sctk::shell::wlr_layer::LayerSurface,
|
||||||
) {
|
) {
|
||||||
let layer = match self.layer_surfaces.iter().position(|s| {
|
let layer = match self.layer_surfaces.iter().position(|s| {
|
||||||
s.surface.wl_surface().id() == layer.wl_surface().id()
|
s.surface.wl_surface().id() == layer.wl_surface().id()
|
||||||
|
|
@ -36,10 +36,10 @@ impl LayerShellHandler for SctkState {
|
||||||
|
|
||||||
fn configure(
|
fn configure(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
layer: &sctk::shell::wlr_layer::LayerSurface,
|
layer: &cctk::sctk::shell::wlr_layer::LayerSurface,
|
||||||
mut configure: sctk::shell::wlr_layer::LayerSurfaceConfigure,
|
mut configure: cctk::sctk::shell::wlr_layer::LayerSurfaceConfigure,
|
||||||
_serial: u32,
|
_serial: u32,
|
||||||
) {
|
) {
|
||||||
self.request_redraw(layer.wl_surface());
|
self.request_redraw(layer.wl_surface());
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ use crate::platform_specific::wayland::{
|
||||||
event_loop::state::{self, PopupParent, SctkState},
|
event_loop::state::{self, PopupParent, SctkState},
|
||||||
sctk_event::{PopupEventVariant, SctkEvent},
|
sctk_event::{PopupEventVariant, SctkEvent},
|
||||||
};
|
};
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
delegate_xdg_popup, reexports::client::Proxy,
|
delegate_xdg_popup, reexports::client::Proxy,
|
||||||
shell::xdg::popup::PopupHandler,
|
shell::xdg::popup::PopupHandler,
|
||||||
};
|
};
|
||||||
|
|
@ -10,10 +10,10 @@ use sctk::{
|
||||||
impl PopupHandler for SctkState {
|
impl PopupHandler for SctkState {
|
||||||
fn configure(
|
fn configure(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
popup: &sctk::shell::xdg::popup::Popup,
|
popup: &cctk::sctk::shell::xdg::popup::Popup,
|
||||||
configure: sctk::shell::xdg::popup::PopupConfigure,
|
configure: cctk::sctk::shell::xdg::popup::PopupConfigure,
|
||||||
) {
|
) {
|
||||||
self.request_redraw(popup.wl_surface());
|
self.request_redraw(popup.wl_surface());
|
||||||
let sctk_popup = match self.popups.iter_mut().find(|s| {
|
let sctk_popup = match self.popups.iter_mut().find(|s| {
|
||||||
|
|
@ -43,9 +43,9 @@ impl PopupHandler for SctkState {
|
||||||
|
|
||||||
fn done(
|
fn done(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
popup: &sctk::shell::xdg::popup::Popup,
|
popup: &cctk::sctk::shell::xdg::popup::Popup,
|
||||||
) {
|
) {
|
||||||
let sctk_popup = match self.popups.iter().position(|s| {
|
let sctk_popup = match self.popups.iter().position(|s| {
|
||||||
s.popup.wl_surface().clone() == popup.wl_surface().clone()
|
s.popup.wl_surface().clone() == popup.wl_surface().clone()
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
use crate::platform_specific::wayland::event_loop::state::SctkState;
|
use crate::platform_specific::wayland::event_loop::state::SctkState;
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
delegate_xdg_shell, delegate_xdg_window, shell::xdg::window::WindowHandler,
|
delegate_xdg_shell, delegate_xdg_window, shell::xdg::window::WindowHandler,
|
||||||
};
|
};
|
||||||
|
|
||||||
impl WindowHandler for SctkState {
|
impl WindowHandler for SctkState {
|
||||||
fn request_close(
|
fn request_close(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
_window: &sctk::shell::xdg::window::Window,
|
_window: &cctk::sctk::shell::xdg::window::Window,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn configure(
|
fn configure(
|
||||||
&mut self,
|
&mut self,
|
||||||
_conn: &sctk::reexports::client::Connection,
|
_conn: &cctk::sctk::reexports::client::Connection,
|
||||||
_qh: &sctk::reexports::client::QueueHandle<Self>,
|
_qh: &cctk::sctk::reexports::client::QueueHandle<Self>,
|
||||||
_window: &sctk::shell::xdg::window::Window,
|
_window: &cctk::sctk::shell::xdg::window::Window,
|
||||||
_configure: sctk::shell::xdg::window::WindowConfigure,
|
_configure: cctk::sctk::shell::xdg::window::WindowConfigure,
|
||||||
_serial: u32,
|
_serial: u32,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::platform_specific::wayland::handlers::SctkState;
|
use crate::platform_specific::wayland::handlers::SctkState;
|
||||||
use sctk::delegate_subcompositor;
|
use cctk::sctk::delegate_subcompositor;
|
||||||
|
|
||||||
delegate_subcompositor!(SctkState);
|
delegate_subcompositor!(SctkState);
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
// From: https://github.com/rust-windowing/winit/blob/master/src/platform_impl/linux/wayland/types/wp_fractional_scaling.rs
|
// From: https://github.com/rust-windowing/winit/blob/master/src/platform_impl/linux/wayland/types/wp_fractional_scaling.rs
|
||||||
//! Handling of the fractional scaling.
|
//! Handling of the fractional scaling.
|
||||||
|
|
||||||
use sctk::reexports::client::globals::{BindError, GlobalList};
|
use cctk::sctk::reexports::client::globals::{BindError, GlobalList};
|
||||||
use sctk::reexports::client::protocol::wl_surface::WlSurface;
|
use cctk::sctk::reexports::client::protocol::wl_surface::WlSurface;
|
||||||
use sctk::reexports::client::Dispatch;
|
use cctk::sctk::reexports::client::Dispatch;
|
||||||
use sctk::reexports::client::{delegate_dispatch, Connection, Proxy, QueueHandle};
|
use cctk::sctk::reexports::client::{delegate_dispatch, Connection, Proxy, QueueHandle};
|
||||||
use sctk::reexports::protocols::wp::fractional_scale::v1::client::wp_fractional_scale_manager_v1::WpFractionalScaleManagerV1;
|
use cctk::sctk::reexports::protocols::wp::fractional_scale::v1::client::wp_fractional_scale_manager_v1::WpFractionalScaleManagerV1;
|
||||||
use sctk::reexports::protocols::wp::fractional_scale::v1::client::wp_fractional_scale_v1::Event as FractionalScalingEvent;
|
use cctk::sctk::reexports::protocols::wp::fractional_scale::v1::client::wp_fractional_scale_v1::Event as FractionalScalingEvent;
|
||||||
use sctk::reexports::protocols::wp::fractional_scale::v1::client::wp_fractional_scale_v1::WpFractionalScaleV1;
|
use cctk::sctk::reexports::protocols::wp::fractional_scale::v1::client::wp_fractional_scale_v1::WpFractionalScaleV1;
|
||||||
|
|
||||||
use sctk::globals::GlobalData;
|
use cctk::sctk::globals::GlobalData;
|
||||||
|
|
||||||
use crate::platform_specific::wayland::event_loop::state::SctkState;
|
use crate::platform_specific::wayland::event_loop::state::SctkState;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
//! Handling of the wp-viewporter.
|
//! Handling of the wp-viewporter.
|
||||||
|
|
||||||
use sctk::reexports::client::globals::{BindError, GlobalList};
|
use cctk::sctk::reexports::client::globals::{BindError, GlobalList};
|
||||||
use sctk::reexports::client::protocol::wl_surface::WlSurface;
|
use cctk::sctk::reexports::client::protocol::wl_surface::WlSurface;
|
||||||
use sctk::reexports::client::Dispatch;
|
use cctk::sctk::reexports::client::Dispatch;
|
||||||
use sctk::reexports::client::{
|
use cctk::sctk::reexports::client::{
|
||||||
delegate_dispatch, Connection, Proxy, QueueHandle,
|
delegate_dispatch, Connection, Proxy, QueueHandle,
|
||||||
};
|
};
|
||||||
use sctk::reexports::protocols::wp::viewporter::client::wp_viewport::WpViewport;
|
use cctk::sctk::reexports::protocols::wp::viewporter::client::wp_viewport::WpViewport;
|
||||||
use sctk::reexports::protocols::wp::viewporter::client::wp_viewporter::WpViewporter;
|
use cctk::sctk::reexports::protocols::wp::viewporter::client::wp_viewporter::WpViewporter;
|
||||||
|
|
||||||
use sctk::globals::GlobalData;
|
use cctk::sctk::globals::GlobalData;
|
||||||
|
|
||||||
use crate::platform_specific::wayland::event_loop::state::SctkState;
|
use crate::platform_specific::wayland::event_loop::state::SctkState;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,13 @@ use super::{PlatformSpecific, SurfaceIdWrapper};
|
||||||
use crate::{Control, Program, WindowManager};
|
use crate::{Control, Program, WindowManager};
|
||||||
|
|
||||||
use crate::platform_specific::UserInterfaces;
|
use crate::platform_specific::UserInterfaces;
|
||||||
|
use cctk::sctk::reexports::calloop;
|
||||||
|
use cctk::sctk::reexports::client::protocol::wl_surface::WlSurface;
|
||||||
|
use cctk::sctk::seat::keyboard::Modifiers;
|
||||||
use cursor_icon::CursorIcon;
|
use cursor_icon::CursorIcon;
|
||||||
use iced_futures::futures::channel::mpsc;
|
use iced_futures::futures::channel::mpsc;
|
||||||
use iced_graphics::{Compositor, compositor};
|
use iced_graphics::{Compositor, compositor};
|
||||||
use iced_runtime::core::window;
|
use iced_runtime::core::window;
|
||||||
use sctk::reexports::calloop;
|
|
||||||
use sctk::reexports::client::protocol::wl_surface::WlSurface;
|
|
||||||
use sctk::seat::keyboard::Modifiers;
|
|
||||||
use sctk_event::SctkEvent;
|
use sctk_event::SctkEvent;
|
||||||
use std::{collections::HashMap, sync::Arc};
|
use std::{collections::HashMap, sync::Arc};
|
||||||
use subsurface_widget::{SubsurfaceInstance, SubsurfaceState};
|
use subsurface_widget::{SubsurfaceInstance, SubsurfaceState};
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ use iced_runtime::{
|
||||||
user_interface,
|
user_interface,
|
||||||
};
|
};
|
||||||
|
|
||||||
use sctk::{
|
use cctk::sctk::{
|
||||||
output::OutputInfo,
|
output::OutputInfo,
|
||||||
reexports::{
|
reexports::{
|
||||||
calloop::channel,
|
calloop::channel,
|
||||||
|
|
@ -216,7 +216,7 @@ pub enum WindowEventVariant {
|
||||||
Configure((NonZeroU32, NonZeroU32), WindowConfigure, WlSurface, bool),
|
Configure((NonZeroU32, NonZeroU32), WindowConfigure, WlSurface, bool),
|
||||||
Size((NonZeroU32, NonZeroU32), WlSurface, bool),
|
Size((NonZeroU32, NonZeroU32), WlSurface, bool),
|
||||||
/// window state changed
|
/// window state changed
|
||||||
StateChanged(sctk::reexports::csd_frame::WindowState),
|
StateChanged(cctk::sctk::reexports::csd_frame::WindowState),
|
||||||
/// Scale Factor
|
/// Scale Factor
|
||||||
ScaleFactorChanged(f64, Option<WpViewport>),
|
ScaleFactorChanged(f64, Option<WpViewport>),
|
||||||
}
|
}
|
||||||
|
|
@ -748,12 +748,11 @@ impl SctkEvent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut ui = crate::program::build_user_interface(
|
let mut ui = crate::build_user_interface(
|
||||||
program,
|
program,
|
||||||
user_interface::Cache::default(),
|
user_interface::Cache::default(),
|
||||||
&mut window.renderer,
|
&mut window.renderer,
|
||||||
logical_size,
|
logical_size,
|
||||||
debug,
|
|
||||||
surface_id,
|
surface_id,
|
||||||
window.raw.clone(),
|
window.raw.clone(),
|
||||||
window.prev_dnd_destination_rectangles_count,
|
window.prev_dnd_destination_rectangles_count,
|
||||||
|
|
@ -949,8 +948,7 @@ impl SctkEvent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let window = window_manager.insert(
|
let window = window_manager.insert(
|
||||||
<<<<<<< HEAD
|
|
||||||
surface_id,
|
surface_id,
|
||||||
sctk_winit,
|
sctk_winit,
|
||||||
program,
|
program,
|
||||||
|
|
@ -960,13 +958,11 @@ impl SctkEvent {
|
||||||
);
|
);
|
||||||
let logical_size = window.logical_size();
|
let logical_size = window.logical_size();
|
||||||
|
|
||||||
|
let mut ui = crate::build_user_interface(
|
||||||
let mut ui = crate::program::build_user_interface(
|
|
||||||
program,
|
program,
|
||||||
user_interface::Cache::default(),
|
user_interface::Cache::default(),
|
||||||
&mut window.renderer,
|
&mut window.renderer,
|
||||||
logical_size,
|
logical_size,
|
||||||
debug,
|
|
||||||
surface_id,
|
surface_id,
|
||||||
window.raw.clone(),
|
window.raw.clone(),
|
||||||
window.prev_dnd_destination_rectangles_count,
|
window.prev_dnd_destination_rectangles_count,
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::futures::futures::channel::oneshot;
|
use crate::futures::futures::channel::oneshot;
|
||||||
use iced_futures::core::window;
|
use cctk::sctk::{
|
||||||
use sctk::{
|
|
||||||
compositor::SurfaceData,
|
compositor::SurfaceData,
|
||||||
globals::GlobalData,
|
globals::GlobalData,
|
||||||
reexports::client::{
|
reexports::client::{
|
||||||
|
|
@ -38,6 +37,7 @@ use sctk::{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
use iced_futures::core::window;
|
||||||
use wayland_backend::client::ObjectId;
|
use wayland_backend::client::ObjectId;
|
||||||
use wayland_protocols::wp::{
|
use wayland_protocols::wp::{
|
||||||
alpha_modifier::v1::client::{
|
alpha_modifier::v1::client::{
|
||||||
|
|
@ -346,7 +346,7 @@ impl SubsurfaceState {
|
||||||
let wp_viewport = self.wp_viewporter.get_viewport(
|
let wp_viewport = self.wp_viewporter.get_viewport(
|
||||||
&wl_surface,
|
&wl_surface,
|
||||||
&self.qh,
|
&self.qh,
|
||||||
sctk::globals::GlobalData,
|
cctk::sctk::globals::GlobalData,
|
||||||
);
|
);
|
||||||
|
|
||||||
let wp_alpha_modifier_surface =
|
let wp_alpha_modifier_surface =
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
use crate::platform_specific::wayland::Action;
|
use crate::platform_specific::wayland::Action;
|
||||||
use raw_window_handle::HandleError;
|
use cctk::sctk::reexports::{
|
||||||
use sctk::reexports::{
|
|
||||||
calloop::channel,
|
calloop::channel,
|
||||||
client::{
|
client::{
|
||||||
Proxy, QueueHandle,
|
Proxy, QueueHandle,
|
||||||
protocol::{wl_display::WlDisplay, wl_surface::WlSurface},
|
protocol::{wl_display::WlDisplay, wl_surface::WlSurface},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
use raw_window_handle::HandleError;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use winit::{
|
use winit::{
|
||||||
dpi::{LogicalSize, PhysicalPosition},
|
dpi::{LogicalSize, PhysicalPosition},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue