yoda: iced_winit dead-code purge (29→0 warnings)
Removed code paths inherited from past refactors that no longer have any
reader:
- ViewFn type alias (window.rs)
- a11y_enabled flag and resized flag (lib.rs) — assigned but never read
- BootConfig.fonts/graphics_settings/is_wayland — already passed to
run_instance(...) directly; the BootConfig copies were never read
- Runner.system_theme oneshot::Sender — stored but no producer ever
wired; receiver side already falls back to default
- event_loop/control_flow.rs — local ControlFlow enum, all callers use
winit::event_loop::ControlFlow
- event_loop/proxy.rs — Proxy<Message> never constructed
- Error::Connect(ConnectError) variant — never constructed
- Common.has_focus / ime_pos / ime_size — never read after assignment
- SctkPopupData.grab — replicated settings.grab, never read back
- SubsurfaceEventVariant::Created.surface field — destructure does
`surface: _` everywhere, the value is unused
Visibility tightening:
- a11y.rs WinitActivationHandler / WinitActionHandler /
WinitDeactivationHandler: pub proxy → pub(crate) proxy
- conversion::touch_event: pub → private (no external callers)
- proxy::Proxy:🆕 pub → pub(crate)
Allow attributes (intentional, not warning-suppression):
- conversion::RawImage: #[allow(dead_code)] — fields kept for
IconProvider downcast-via-AsAny on winit's side
- event_loop::Error: #[allow(dead_code)] — variant payloads kept for
Debug, never inspected programmatically
- lib.rs Event<Message>: #[allow(hidden_glob_reexports)] — intentional
shadow of winit::event::Event coming from `pub use winit`
- window.rs/lib.rs: #[allow(deprecated)] on enable_ime/disable_ime/
process_event with TODOs for set_ime_* → request_ime_update and
try_next → try_recv migrations
Five orphan imports also removed (Hash/Hasher, BorrowMut, 3× Compositor).
Leyoda 2026 – GPLv3
This commit is contained in:
parent
4b6a05931e
commit
12c870af7a
13 changed files with 22 additions and 176 deletions
|
|
@ -7,7 +7,7 @@ use iced_accessibility::accesskit::{
|
||||||
use iced_runtime::core;
|
use iced_runtime::core;
|
||||||
|
|
||||||
pub struct WinitActivationHandler {
|
pub struct WinitActivationHandler {
|
||||||
pub proxy: mpsc::UnboundedSender<Control>,
|
pub(crate) proxy: mpsc::UnboundedSender<Control>,
|
||||||
pub title: String,
|
pub title: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ impl ActivationHandler for WinitActivationHandler {
|
||||||
|
|
||||||
pub struct WinitActionHandler {
|
pub struct WinitActionHandler {
|
||||||
pub id: core::window::Id,
|
pub id: core::window::Id,
|
||||||
pub proxy: mpsc::UnboundedSender<Control>,
|
pub(crate) proxy: mpsc::UnboundedSender<Control>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl iced_accessibility::accesskit::ActionHandler for WinitActionHandler {
|
impl iced_accessibility::accesskit::ActionHandler for WinitActionHandler {
|
||||||
|
|
@ -48,7 +48,7 @@ impl iced_accessibility::accesskit::ActionHandler for WinitActionHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct WinitDeactivationHandler {
|
pub struct WinitDeactivationHandler {
|
||||||
pub proxy: mpsc::UnboundedSender<Control>,
|
pub(crate) proxy: mpsc::UnboundedSender<Control>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl iced_accessibility::accesskit::DeactivationHandler
|
impl iced_accessibility::accesskit::DeactivationHandler
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
//! [`winit`]: https://github.com/rust-windowing/winit
|
//! [`winit`]: https://github.com/rust-windowing/winit
|
||||||
//! [`iced_runtime`]: https://github.com/iced-rs/iced/tree/0.14/runtime
|
//! [`iced_runtime`]: https://github.com/iced-rs/iced/tree/0.14/runtime
|
||||||
use crate::core::input_method;
|
use crate::core::input_method;
|
||||||
use std::hash::Hash;
|
|
||||||
use std::hash::Hasher;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crate::core::keyboard;
|
use crate::core::keyboard;
|
||||||
|
|
@ -698,7 +696,7 @@ enum TouchInternal {
|
||||||
///
|
///
|
||||||
/// [`winit`]: https://github.com/rust-windowing/winit
|
/// [`winit`]: https://github.com/rust-windowing/winit
|
||||||
/// [`iced`]: https://github.com/iced-rs/iced/tree/0.12
|
/// [`iced`]: https://github.com/iced-rs/iced/tree/0.12
|
||||||
pub fn touch_event(
|
fn touch_event(
|
||||||
finger: FingerId,
|
finger: FingerId,
|
||||||
state: TouchInternal,
|
state: TouchInternal,
|
||||||
_force: Option<Force>,
|
_force: Option<Force>,
|
||||||
|
|
@ -1591,7 +1589,10 @@ pub fn resize_direction(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fields are passed through to winit via `IconProvider: AsAny` for potential
|
||||||
|
// downcast; they are not read directly here.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct RawImage(Vec<u8>, Size<u32>);
|
pub struct RawImage(Vec<u8>, Size<u32>);
|
||||||
impl IconProvider for RawImage {}
|
impl IconProvider for RawImage {}
|
||||||
impl From<RawImage> for winit_core::icon::Icon {
|
impl From<RawImage> for winit_core::icon::Icon {
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,8 @@ where
|
||||||
|
|
||||||
let (boot_sender, boot_receiver) = oneshot::channel();
|
let (boot_sender, boot_receiver) = oneshot::channel();
|
||||||
let (control_sender, control_receiver) = mpsc::unbounded();
|
let (control_sender, control_receiver) = mpsc::unbounded();
|
||||||
let (system_theme_sender, system_theme_receiver) = oneshot::channel();
|
// Sender side currently not wired to a producer; receiver gets default.
|
||||||
|
let (_system_theme_sender, system_theme_receiver) = oneshot::channel();
|
||||||
|
|
||||||
let instance = Box::pin(run_instance::<P>(
|
let instance = Box::pin(run_instance::<P>(
|
||||||
program,
|
program,
|
||||||
|
|
@ -178,9 +179,6 @@ where
|
||||||
|
|
||||||
struct BootConfig {
|
struct BootConfig {
|
||||||
sender: oneshot::Sender<()>,
|
sender: oneshot::Sender<()>,
|
||||||
fonts: Vec<Cow<'static, [u8]>>,
|
|
||||||
graphics_settings: graphics::Settings,
|
|
||||||
is_wayland: bool,
|
|
||||||
}
|
}
|
||||||
struct Runner<Message: 'static, F> {
|
struct Runner<Message: 'static, F> {
|
||||||
instance: std::pin::Pin<Box<F>>,
|
instance: std::pin::Pin<Box<F>>,
|
||||||
|
|
@ -190,7 +188,6 @@ where
|
||||||
sender: mpsc::UnboundedSender<Event<Message>>,
|
sender: mpsc::UnboundedSender<Event<Message>>,
|
||||||
receiver: mpsc::UnboundedReceiver<Control>,
|
receiver: mpsc::UnboundedReceiver<Control>,
|
||||||
error: Option<Error>,
|
error: Option<Error>,
|
||||||
system_theme: Option<oneshot::Sender<theme::Mode>>,
|
|
||||||
control_sender: mpsc::UnboundedSender<Control>,
|
control_sender: mpsc::UnboundedSender<Control>,
|
||||||
|
|
||||||
#[cfg(feature = "a11y")]
|
#[cfg(feature = "a11y")]
|
||||||
|
|
@ -207,16 +204,12 @@ where
|
||||||
context,
|
context,
|
||||||
boot: Some(BootConfig {
|
boot: Some(BootConfig {
|
||||||
sender: boot_sender,
|
sender: boot_sender,
|
||||||
fonts: settings.fonts,
|
|
||||||
graphics_settings,
|
|
||||||
is_wayland,
|
|
||||||
}),
|
}),
|
||||||
id: settings.id,
|
id: settings.id,
|
||||||
sender: event_sender,
|
sender: event_sender,
|
||||||
receiver: control_receiver,
|
receiver: control_receiver,
|
||||||
control_sender: control_sender.clone(),
|
control_sender: control_sender.clone(),
|
||||||
error: None,
|
error: None,
|
||||||
system_theme: Some(system_theme_sender),
|
|
||||||
|
|
||||||
#[cfg(feature = "a11y")]
|
#[cfg(feature = "a11y")]
|
||||||
adapters: Default::default(),
|
adapters: Default::default(),
|
||||||
|
|
@ -319,12 +312,7 @@ where
|
||||||
event_loop: &dyn winit::event_loop::ActiveEventLoop,
|
event_loop: &dyn winit::event_loop::ActiveEventLoop,
|
||||||
) {
|
) {
|
||||||
// create initial window
|
// create initial window
|
||||||
let Some(BootConfig {
|
let Some(BootConfig { sender }) = self.boot.take()
|
||||||
sender,
|
|
||||||
fonts: _,
|
|
||||||
graphics_settings: _,
|
|
||||||
is_wayland: _,
|
|
||||||
}) = self.boot.take()
|
|
||||||
else {
|
else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
@ -691,6 +679,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(hidden_glob_reexports)] // intentional: internal Event shadows winit::event::Event from `pub use winit`
|
||||||
enum Event<Message: 'static> {
|
enum Event<Message: 'static> {
|
||||||
WindowCreated {
|
WindowCreated {
|
||||||
id: window::Id,
|
id: window::Id,
|
||||||
|
|
@ -798,9 +787,6 @@ async fn run_instance<P>(
|
||||||
> = None;
|
> = None;
|
||||||
let mut dnd_surface_id: Option<window::Id> = None;
|
let mut dnd_surface_id: Option<window::Id> = None;
|
||||||
|
|
||||||
#[cfg(feature = "a11y")]
|
|
||||||
let mut a11y_enabled = false;
|
|
||||||
|
|
||||||
#[cfg(all(feature = "linux-theme-detection", target_os = "linux"))]
|
#[cfg(all(feature = "linux-theme-detection", target_os = "linux"))]
|
||||||
let mut system_theme = {
|
let mut system_theme = {
|
||||||
let to_mode = |color_scheme| match color_scheme {
|
let to_mode = |color_scheme| match color_scheme {
|
||||||
|
|
@ -1393,7 +1379,6 @@ async fn run_instance<P>(
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut uis_stale = false;
|
let mut uis_stale = false;
|
||||||
let mut resized = false;
|
|
||||||
for (id, window) in window_manager.iter_mut() {
|
for (id, window) in window_manager.iter_mut() {
|
||||||
if skip && !window.resize_enabled {
|
if skip && !window.resize_enabled {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -1446,7 +1431,6 @@ async fn run_instance<P>(
|
||||||
// FIXME what to do when we are stuck in a configure event/resize request loop
|
// FIXME what to do when we are stuck in a configure event/resize request loop
|
||||||
// We don't have control over how winit handles this.
|
// We don't have control over how winit handles this.
|
||||||
window.resize_enabled = true;
|
window.resize_enabled = true;
|
||||||
resized = true;
|
|
||||||
needs_redraw = true;
|
needs_redraw = true;
|
||||||
let s = winit::dpi::Size::Logical(
|
let s = winit::dpi::Size::Logical(
|
||||||
requested_size.cast(),
|
requested_size.cast(),
|
||||||
|
|
@ -1661,8 +1645,8 @@ async fn run_instance<P>(
|
||||||
events.push((Some(id), conversion::a11y(action_request)));
|
events.push((Some(id), conversion::a11y(action_request)));
|
||||||
}
|
}
|
||||||
#[cfg(feature = "a11y")]
|
#[cfg(feature = "a11y")]
|
||||||
Event::AccessibilityEnabled(enabled) => {
|
Event::AccessibilityEnabled(_enabled) => {
|
||||||
a11y_enabled = enabled;
|
// a11y enable signal currently unused at this layer
|
||||||
}
|
}
|
||||||
Event::PlatformSpecific(e) => {
|
Event::PlatformSpecific(e) => {
|
||||||
crate::platform_specific::handle_event(
|
crate::platform_specific::handle_event(
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use iced_graphics::{Compositor, compositor};
|
use iced_graphics::compositor;
|
||||||
use iced_runtime::{
|
use iced_runtime::{
|
||||||
core::{Vector, window}, user_interface,
|
core::{Vector, window}, user_interface,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
/// Set by the user callback given to the [`EventLoop::run`] method.
|
|
||||||
///
|
|
||||||
/// Indicates the desired behavior of the event loop after [`Event::RedrawEventsCleared`] is emitted.
|
|
||||||
///
|
|
||||||
/// Defaults to [`Poll`].
|
|
||||||
///
|
|
||||||
/// ## Persistency
|
|
||||||
///
|
|
||||||
/// Almost every change is persistent between multiple calls to the event loop closure within a
|
|
||||||
/// given run loop. The only exception to this is [`ExitWithCode`] which, once set, cannot be unset.
|
|
||||||
/// Changes are **not** persistent between multiple calls to `run_return` - issuing a new call will
|
|
||||||
/// reset the control flow to [`Poll`].
|
|
||||||
///
|
|
||||||
/// [`ExitWithCode`]: Self::ExitWithCode
|
|
||||||
/// [`Poll`]: Self::Poll
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
|
||||||
pub enum ControlFlow {
|
|
||||||
/// When the current loop iteration finishes, immediately begin a new iteration regardless of
|
|
||||||
/// whether or not new events are available to process.
|
|
||||||
///
|
|
||||||
/// ## Platform-specific
|
|
||||||
///
|
|
||||||
/// - **Web:** Events are queued and usually sent when `requestAnimationFrame` fires but sometimes
|
|
||||||
/// the events in the queue may be sent before the next `requestAnimationFrame` callback, for
|
|
||||||
/// example when the scaling of the page has changed. This should be treated as an implementation
|
|
||||||
/// detail which should not be relied on.
|
|
||||||
Poll,
|
|
||||||
/// When the current loop iteration finishes, suspend the thread until another event arrives.
|
|
||||||
Wait,
|
|
||||||
/// When the current loop iteration finishes, suspend the thread until either another event
|
|
||||||
/// arrives or the given time is reached.
|
|
||||||
///
|
|
||||||
/// Useful for implementing efficient timers. Applications which want to render at the display's
|
|
||||||
/// native refresh rate should instead use [`Poll`] and the VSync functionality of a graphics API
|
|
||||||
/// to reduce odds of missed frames.
|
|
||||||
///
|
|
||||||
/// [`Poll`]: Self::Poll
|
|
||||||
WaitUntil(std::time::Instant),
|
|
||||||
/// Send a [`LoopDestroyed`] event and stop the event loop. This variant is *sticky* - once set,
|
|
||||||
/// `control_flow` cannot be changed from `ExitWithCode`, and any future attempts to do so will
|
|
||||||
/// result in the `control_flow` parameter being reset to `ExitWithCode`.
|
|
||||||
///
|
|
||||||
/// The contained number will be used as exit code. The [`Exit`] constant is a shortcut for this
|
|
||||||
/// with exit code 0.
|
|
||||||
///
|
|
||||||
/// ## Platform-specific
|
|
||||||
///
|
|
||||||
/// - **Android / iOS / WASM:** The supplied exit code is unused.
|
|
||||||
/// - **Unix:** On most Unix-like platforms, only the 8 least significant bits will be used,
|
|
||||||
/// which can cause surprises with negative exit values (`-42` would end up as `214`). See
|
|
||||||
/// [`std::process::exit`].
|
|
||||||
///
|
|
||||||
/// [`LoopDestroyed`]: Event::LoopDestroyed
|
|
||||||
/// [`Exit`]: ControlFlow::Exit
|
|
||||||
ExitWithCode(i32),
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
pub mod control_flow;
|
|
||||||
pub mod proxy;
|
|
||||||
pub mod state;
|
pub mod state;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
@ -31,7 +29,7 @@ use cctk::{
|
||||||
reexports::{
|
reexports::{
|
||||||
calloop::{self, EventLoop},
|
calloop::{self, EventLoop},
|
||||||
client::{
|
client::{
|
||||||
ConnectError, Connection, Proxy, globals::registry_queue_init,
|
Connection, Proxy, globals::registry_queue_init,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
registry::RegistryState,
|
registry::RegistryState,
|
||||||
|
|
@ -67,8 +65,8 @@ pub struct SctkEventLoop {
|
||||||
pub(crate) state: SctkState,
|
pub(crate) state: SctkState,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)] // payloads kept for Debug; not inspected programmatically
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
Connect(ConnectError),
|
|
||||||
Calloop(calloop::Error),
|
Calloop(calloop::Error),
|
||||||
Global(GlobalError),
|
Global(GlobalError),
|
||||||
NoDisplayHandle,
|
NoDisplayHandle,
|
||||||
|
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
use cctk::sctk::reexports::calloop;
|
|
||||||
use iced_futures::futures::{
|
|
||||||
channel::mpsc,
|
|
||||||
task::{Context, Poll},
|
|
||||||
Sink,
|
|
||||||
};
|
|
||||||
use std::pin::Pin;
|
|
||||||
|
|
||||||
/// An event loop proxy that implements `Sink`.
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub struct Proxy<Message: 'static> {
|
|
||||||
raw: calloop::channel::Sender<Message>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<Message: 'static> Clone for Proxy<Message> {
|
|
||||||
fn clone(&self) -> Self {
|
|
||||||
Self {
|
|
||||||
raw: self.raw.clone(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<Message: 'static> Proxy<Message> {
|
|
||||||
/// Creates a new [`Proxy`] from an `EventLoopProxy`.
|
|
||||||
pub fn new(raw: calloop::channel::Sender<Message>) -> Self {
|
|
||||||
Self { raw }
|
|
||||||
}
|
|
||||||
/// send an event
|
|
||||||
pub fn send_event(&self, message: Message) {
|
|
||||||
let _ = self.raw.send(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<Message: 'static> Sink<Message> for Proxy<Message> {
|
|
||||||
type Error = mpsc::SendError;
|
|
||||||
|
|
||||||
fn poll_ready(
|
|
||||||
self: Pin<&mut Self>,
|
|
||||||
_cx: &mut Context<'_>,
|
|
||||||
) -> Poll<Result<(), Self::Error>> {
|
|
||||||
Poll::Ready(Ok(()))
|
|
||||||
}
|
|
||||||
|
|
||||||
fn start_send(
|
|
||||||
self: Pin<&mut Self>,
|
|
||||||
message: Message,
|
|
||||||
) -> Result<(), Self::Error> {
|
|
||||||
let _ = self.raw.send(message);
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn poll_flush(
|
|
||||||
self: Pin<&mut Self>,
|
|
||||||
_cx: &mut Context<'_>,
|
|
||||||
) -> Poll<Result<(), Self::Error>> {
|
|
||||||
Poll::Ready(Ok(()))
|
|
||||||
}
|
|
||||||
|
|
||||||
fn poll_close(
|
|
||||||
self: Pin<&mut Self>,
|
|
||||||
_cx: &mut Context<'_>,
|
|
||||||
) -> Poll<Result<(), Self::Error>> {
|
|
||||||
Poll::Ready(Ok(()))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -34,7 +34,7 @@ use std::{
|
||||||
};
|
};
|
||||||
use wayland_backend::client::ObjectId;
|
use wayland_backend::client::ObjectId;
|
||||||
use winit::{
|
use winit::{
|
||||||
dpi::{LogicalPosition, LogicalSize},
|
dpi::LogicalSize,
|
||||||
platform::wayland::WindowExtWayland,
|
platform::wayland::WindowExtWayland,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -231,9 +231,6 @@ impl CommonSurface {
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Common {
|
pub struct Common {
|
||||||
pub(crate) fractional_scale: Option<f64>,
|
pub(crate) fractional_scale: Option<f64>,
|
||||||
pub(crate) has_focus: bool,
|
|
||||||
pub(crate) ime_pos: LogicalPosition<u32>,
|
|
||||||
pub(crate) ime_size: LogicalSize<u32>,
|
|
||||||
pub(crate) size: LogicalSize<u32>,
|
pub(crate) size: LogicalSize<u32>,
|
||||||
pub(crate) requested_size: (Option<u32>, Option<u32>),
|
pub(crate) requested_size: (Option<u32>, Option<u32>),
|
||||||
pub(crate) wp_viewport: Option<WpViewport>,
|
pub(crate) wp_viewport: Option<WpViewport>,
|
||||||
|
|
@ -243,9 +240,6 @@ impl Default for Common {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
fractional_scale: Default::default(),
|
fractional_scale: Default::default(),
|
||||||
has_focus: Default::default(),
|
|
||||||
ime_pos: Default::default(),
|
|
||||||
ime_size: Default::default(),
|
|
||||||
size: LogicalSize::new(1, 1),
|
size: LogicalSize::new(1, 1),
|
||||||
requested_size: (None, None),
|
requested_size: (None, None),
|
||||||
wp_viewport: None,
|
wp_viewport: None,
|
||||||
|
|
@ -338,7 +332,6 @@ pub struct SctkPopupData {
|
||||||
pub(crate) parent: PopupParent,
|
pub(crate) parent: PopupParent,
|
||||||
pub(crate) toplevel: WlSurface,
|
pub(crate) toplevel: WlSurface,
|
||||||
pub(crate) positioner: Arc<XdgPositioner>,
|
pub(crate) positioner: Arc<XdgPositioner>,
|
||||||
pub(crate) grab: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
@ -879,7 +872,6 @@ impl SctkState {
|
||||||
parent: parent.clone(),
|
parent: parent.clone(),
|
||||||
toplevel: toplevel.clone(),
|
toplevel: toplevel.clone(),
|
||||||
positioner: positioner.clone(),
|
positioner: positioner.clone(),
|
||||||
grab: settings.grab,
|
|
||||||
},
|
},
|
||||||
last_configure: None,
|
last_configure: None,
|
||||||
_pending_requests: Default::default(),
|
_pending_requests: Default::default(),
|
||||||
|
|
@ -1539,7 +1531,6 @@ impl SctkState {
|
||||||
SctkEvent::SubsurfaceEvent (crate::sctk_event::SubsurfaceEventVariant::Created{
|
SctkEvent::SubsurfaceEvent (crate::sctk_event::SubsurfaceEventVariant::Created{
|
||||||
parent_id,
|
parent_id,
|
||||||
parent,
|
parent,
|
||||||
surface: subsurface,
|
|
||||||
qh: self.queue_handle.clone(),
|
qh: self.queue_handle.clone(),
|
||||||
common_surface,
|
common_surface,
|
||||||
surface_id: subsurface_settings.id,
|
surface_id: subsurface_settings.id,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ use cctk::sctk::reexports::client::protocol::wl_surface::WlSurface;
|
||||||
use cctk::sctk::seat::keyboard::Modifiers;
|
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;
|
||||||
use iced_runtime::core::{Vector, window};
|
use iced_runtime::core::{Vector, window};
|
||||||
use raw_window_handle::{HasDisplayHandle, HasWindowHandle, RawWindowHandle};
|
use raw_window_handle::{HasDisplayHandle, HasWindowHandle, RawWindowHandle};
|
||||||
use sctk_event::SctkEvent;
|
use sctk_event::SctkEvent;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ use iced_futures::{
|
||||||
},
|
},
|
||||||
futures::{SinkExt, channel::mpsc},
|
futures::{SinkExt, channel::mpsc},
|
||||||
};
|
};
|
||||||
use iced_graphics::{Compositor, compositor};
|
use iced_graphics::compositor;
|
||||||
use iced_runtime::{
|
use iced_runtime::{
|
||||||
core::{
|
core::{
|
||||||
Point,
|
Point,
|
||||||
|
|
@ -282,7 +282,6 @@ pub enum SubsurfaceEventVariant {
|
||||||
Created {
|
Created {
|
||||||
parent_id: window::Id,
|
parent_id: window::Id,
|
||||||
parent: WlSurface,
|
parent: WlSurface,
|
||||||
surface: WlSurface,
|
|
||||||
qh: QueueHandle<SctkState>,
|
qh: QueueHandle<SctkState>,
|
||||||
common_surface: CommonSurface,
|
common_surface: CommonSurface,
|
||||||
surface_id: SurfaceId,
|
surface_id: SurfaceId,
|
||||||
|
|
@ -1509,7 +1508,6 @@ impl SctkEvent {
|
||||||
common,
|
common,
|
||||||
z,
|
z,
|
||||||
parent,
|
parent,
|
||||||
surface: _,
|
|
||||||
qh,
|
qh,
|
||||||
surface_id,
|
surface_id,
|
||||||
display,
|
display,
|
||||||
|
|
|
||||||
|
|
@ -623,7 +623,7 @@ impl Drop for SubsurfaceState {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub(crate) struct SubsurfaceInstance {
|
pub struct SubsurfaceInstance {
|
||||||
pub(crate) wl_surface: WlSurface,
|
pub(crate) wl_surface: WlSurface,
|
||||||
pub(crate) wl_subsurface: WlSubsurface,
|
pub(crate) wl_subsurface: WlSubsurface,
|
||||||
pub(crate) wp_viewport: WpViewport,
|
pub(crate) wp_viewport: WpViewport,
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ impl<T: 'static> Proxy<T> {
|
||||||
const MAX_SIZE: usize = 100;
|
const MAX_SIZE: usize = 100;
|
||||||
|
|
||||||
/// Creates a new [`Proxy`] from an `EventLoopProxy`.
|
/// Creates a new [`Proxy`] from an `EventLoopProxy`.
|
||||||
pub fn new(
|
pub(crate) fn new(
|
||||||
raw: winit::event_loop::EventLoopProxy,
|
raw: winit::event_loop::EventLoopProxy,
|
||||||
event_sender: mpsc::UnboundedSender<Event<T>>,
|
event_sender: mpsc::UnboundedSender<Event<T>>,
|
||||||
) -> (Self, impl Future<Output = ()>) {
|
) -> (Self, impl Future<Output = ()>) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use crate::core::text;
|
||||||
use crate::core::theme::{self, Base};
|
use crate::core::theme::{self, Base};
|
||||||
use crate::core::time::Instant;
|
use crate::core::time::Instant;
|
||||||
use crate::core::{
|
use crate::core::{
|
||||||
Color, Element, InputMethod, Padding, Point, Rectangle, Size, Text, Vector,
|
Color, InputMethod, Padding, Point, Rectangle, Size, Text, Vector,
|
||||||
};
|
};
|
||||||
use crate::graphics::Compositor;
|
use crate::graphics::Compositor;
|
||||||
use crate::program::{self, Program};
|
use crate::program::{self, Program};
|
||||||
|
|
@ -26,10 +26,6 @@ use winit::monitor::MonitorHandle;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
pub(crate) type ViewFn<M, T, R> = Arc<
|
|
||||||
Box<dyn Fn() -> Option<Element<'static, M, T, R>> + Send + Sync + 'static>,
|
|
||||||
>;
|
|
||||||
|
|
||||||
pub struct WindowManager<P, C>
|
pub struct WindowManager<P, C>
|
||||||
where
|
where
|
||||||
P: Program,
|
P: Program,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue