From 57c541353b91f39615a79d99ee56074d58b8d95a Mon Sep 17 00:00:00 2001 From: Ilia Malanin Date: Wed, 13 May 2026 22:33:37 +0200 Subject: [PATCH] chore: bump smithay to upstream c0ac123 --- Cargo.lock | 18 +++++++++--------- Cargo.toml | 2 +- src/state.rs | 2 ++ src/wayland/handlers/alpha_modifier.rs | 6 ------ src/wayland/handlers/compositor.rs | 3 --- src/wayland/handlers/data_control/ext.rs | 7 +------ src/wayland/handlers/data_control/wlr.rs | 7 +------ src/wayland/handlers/data_device.rs | 3 --- src/wayland/handlers/decoration.rs | 4 ---- src/wayland/handlers/dmabuf.rs | 3 --- src/wayland/handlers/drm_lease.rs | 3 --- src/wayland/handlers/drm_syncobj.rs | 7 +------ src/wayland/handlers/fixes.rs | 6 ------ src/wayland/handlers/foreign_toplevel_list.rs | 2 -- src/wayland/handlers/fractional_scale.rs | 3 --- src/wayland/handlers/idle_inhibit.rs | 3 +-- src/wayland/handlers/idle_notify.rs | 3 +-- src/wayland/handlers/image_capture_source.rs | 4 ---- src/wayland/handlers/image_copy_capture/mod.rs | 2 -- src/wayland/handlers/input_method.rs | 3 --- .../handlers/keyboard_shortcuts_inhibit.rs | 9 ++------- src/wayland/handlers/layer_shell.rs | 3 --- src/wayland/handlers/mod.rs | 9 --------- src/wayland/handlers/output.rs | 4 +--- src/wayland/handlers/pointer_constraints.rs | 2 -- src/wayland/handlers/pointer_gestures.rs | 6 ------ src/wayland/handlers/presentation.rs | 6 ------ src/wayland/handlers/primary_selection.rs | 7 ++----- src/wayland/handlers/relative_pointer.rs | 6 ------ src/wayland/handlers/seat.rs | 8 +------- src/wayland/handlers/security_context.rs | 2 -- src/wayland/handlers/session_lock.rs | 3 --- src/wayland/handlers/shm.rs | 7 +------ src/wayland/handlers/single_pixel_buffer.rs | 6 ------ src/wayland/handlers/tablet_manager.rs | 6 ++---- src/wayland/handlers/text_input.rs | 6 ------ src/wayland/handlers/viewporter.rs | 6 ------ src/wayland/handlers/virtual_keyboard.rs | 6 ------ src/wayland/handlers/xdg_activation.rs | 3 --- src/wayland/handlers/xdg_foreign.rs | 7 +------ src/wayland/handlers/xdg_shell/mod.rs | 3 --- src/wayland/handlers/xwayland_keyboard_grab.rs | 3 --- src/wayland/handlers/xwayland_shell.rs | 7 +------ src/wayland/protocols/overlap_notify.rs | 11 +++++++++-- src/wayland/protocols/toplevel_info.rs | 10 ++++++++-- 45 files changed, 45 insertions(+), 192 deletions(-) delete mode 100644 src/wayland/handlers/alpha_modifier.rs delete mode 100644 src/wayland/handlers/fixes.rs delete mode 100644 src/wayland/handlers/pointer_gestures.rs delete mode 100644 src/wayland/handlers/presentation.rs delete mode 100644 src/wayland/handlers/relative_pointer.rs delete mode 100644 src/wayland/handlers/single_pixel_buffer.rs delete mode 100644 src/wayland/handlers/text_input.rs delete mode 100644 src/wayland/handlers/viewporter.rs delete mode 100644 src/wayland/handlers/virtual_keyboard.rs diff --git a/Cargo.lock b/Cargo.lock index c0aac8b0c..1b15257f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1230,7 +1230,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1540,7 +1540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2710,7 +2710,7 @@ dependencies = [ "portable-atomic", "portable-atomic-util", "serde_core", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2823,7 +2823,7 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "770919970f7d2f74fea948900d35e2ef64f44129e8ae4015f59de1f0aca7c2a5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3433,7 +3433,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -4629,7 +4629,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -4924,7 +4924,7 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "smithay" version = "0.7.0" -source = "git+https://github.com/smithay/smithay.git?rev=211c19d#211c19d712dc5f1b78eb879f1c195715801e37ff" +source = "git+https://github.com/smithay/smithay.git?rev=c0ac123#c0ac12315c1621540a586202da91146248215b41" dependencies = [ "aliasable", "appendlist", @@ -5254,7 +5254,7 @@ dependencies = [ "getrandom 0.4.1", "once_cell", "rustix 1.1.4", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -6273,7 +6273,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f98d82001..041f401be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -143,4 +143,4 @@ cosmic-protocols = { git = "https://github.com/pop-os//cosmic-protocols", branch cosmic-client-toolkit = { git = "https://github.com/pop-os//cosmic-protocols", branch = "main" } [patch.crates-io] -smithay = { git = "https://github.com/smithay/smithay.git", rev = "211c19d" } +smithay = { git = "https://github.com/smithay/smithay.git", rev = "c0ac123" } diff --git a/src/state.rs b/src/state.rs index 21dfcef0a..53d0331ab 100644 --- a/src/state.rs +++ b/src/state.rs @@ -1406,3 +1406,5 @@ impl Common { } } } + +smithay::delegate_dispatch2!(State); diff --git a/src/wayland/handlers/alpha_modifier.rs b/src/wayland/handlers/alpha_modifier.rs deleted file mode 100644 index bcc5eb927..000000000 --- a/src/wayland/handlers/alpha_modifier.rs +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -use crate::state::State; -use smithay::delegate_alpha_modifier; - -delegate_alpha_modifier!(State); diff --git a/src/wayland/handlers/compositor.rs b/src/wayland/handlers/compositor.rs index b972a6030..92b51e587 100644 --- a/src/wayland/handlers/compositor.rs +++ b/src/wayland/handlers/compositor.rs @@ -7,7 +7,6 @@ use smithay::{ element::{Kind, surface::KindEvaluation}, utils::{on_commit_buffer_handler, with_renderer_surface_state}, }, - delegate_compositor, desktop::{LayerSurface, PopupKind, WindowSurfaceType, layer_map_for_output}, reexports::wayland_server::{Client, Resource, protocol::wl_surface::WlSurface}, utils::{Clock, Logical, Monotonic, SERIAL_COUNTER, Size, Time}, @@ -434,5 +433,3 @@ impl State { false } } - -delegate_compositor!(State); diff --git a/src/wayland/handlers/data_control/ext.rs b/src/wayland/handlers/data_control/ext.rs index e7ab85298..6fc5530df 100644 --- a/src/wayland/handlers/data_control/ext.rs +++ b/src/wayland/handlers/data_control/ext.rs @@ -1,13 +1,8 @@ use crate::state::State; -use smithay::{ - delegate_ext_data_control, - wayland::selection::ext_data_control::{DataControlHandler, DataControlState}, -}; +use smithay::wayland::selection::ext_data_control::{DataControlHandler, DataControlState}; impl DataControlHandler for State { fn data_control_state(&mut self) -> &mut DataControlState { &mut self.common.ext_data_control_state } } - -delegate_ext_data_control!(State); diff --git a/src/wayland/handlers/data_control/wlr.rs b/src/wayland/handlers/data_control/wlr.rs index d02c722e2..a932429fc 100644 --- a/src/wayland/handlers/data_control/wlr.rs +++ b/src/wayland/handlers/data_control/wlr.rs @@ -1,15 +1,10 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::state::State; -use smithay::{ - delegate_data_control, - wayland::selection::wlr_data_control::{DataControlHandler, DataControlState}, -}; +use smithay::wayland::selection::wlr_data_control::{DataControlHandler, DataControlState}; impl DataControlHandler for State { fn data_control_state(&mut self) -> &mut DataControlState { &mut self.common.wlr_data_control_state } } - -delegate_data_control!(State); diff --git a/src/wayland/handlers/data_device.rs b/src/wayland/handlers/data_device.rs index 67861874e..51dae6fbc 100644 --- a/src/wayland/handlers/data_device.rs +++ b/src/wayland/handlers/data_device.rs @@ -2,7 +2,6 @@ use crate::{state::State, utils::prelude::SeatExt}; use smithay::{ - delegate_data_device, input::{ Seat, dnd::{DnDGrab, DndGrabHandler, DndTarget, GrabType}, @@ -135,5 +134,3 @@ impl DataDeviceHandler for State { &mut self.common.data_device_state } } - -delegate_data_device!(State); diff --git a/src/wayland/handlers/decoration.rs b/src/wayland/handlers/decoration.rs index 42296062d..90ec5855e 100644 --- a/src/wayland/handlers/decoration.rs +++ b/src/wayland/handlers/decoration.rs @@ -1,7 +1,6 @@ use std::{cell::RefCell, sync::Mutex}; use smithay::{ - delegate_kde_decoration, delegate_xdg_decoration, desktop::Window, reexports::{ wayland_protocols::xdg::decoration::zv1::server::zxdg_toplevel_decoration_v1::Mode as XdgMode, @@ -186,6 +185,3 @@ impl KdeDecorationHandler for State { }); } } - -delegate_xdg_decoration!(State); -delegate_kde_decoration!(State); diff --git a/src/wayland/handlers/dmabuf.rs b/src/wayland/handlers/dmabuf.rs index 90583aab2..093f88da6 100644 --- a/src/wayland/handlers/dmabuf.rs +++ b/src/wayland/handlers/dmabuf.rs @@ -6,7 +6,6 @@ use crate::{ }; use smithay::{ backend::{allocator::dmabuf::Dmabuf, renderer::element::Kind}, - delegate_dmabuf, desktop::WindowSurfaceType, reexports::wayland_server::protocol::wl_surface::WlSurface, wayland::{ @@ -89,5 +88,3 @@ impl DmabufHandler for State { })) } } - -delegate_dmabuf!(State); diff --git a/src/wayland/handlers/drm_lease.rs b/src/wayland/handlers/drm_lease.rs index 60ae2b52a..d42533540 100644 --- a/src/wayland/handlers/drm_lease.rs +++ b/src/wayland/handlers/drm_lease.rs @@ -3,7 +3,6 @@ use crate::state::State; use smithay::{ backend::drm::DrmNode, - delegate_drm_lease, wayland::drm_lease::{ DrmLease, DrmLeaseBuilder, DrmLeaseHandler, DrmLeaseRequest, DrmLeaseState, LeaseRejected, }, @@ -134,5 +133,3 @@ impl DrmLeaseHandler for State { } } } - -delegate_drm_lease!(State); diff --git a/src/wayland/handlers/drm_syncobj.rs b/src/wayland/handlers/drm_syncobj.rs index f519a5c9d..e167cf113 100644 --- a/src/wayland/handlers/drm_syncobj.rs +++ b/src/wayland/handlers/drm_syncobj.rs @@ -1,10 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::state::{BackendData, State}; -use smithay::{ - delegate_drm_syncobj, - wayland::drm_syncobj::{DrmSyncobjHandler, DrmSyncobjState}, -}; +use smithay::wayland::drm_syncobj::{DrmSyncobjHandler, DrmSyncobjState}; impl DrmSyncobjHandler for State { fn drm_syncobj_state(&mut self) -> Option<&mut DrmSyncobjState> { @@ -15,5 +12,3 @@ impl DrmSyncobjHandler for State { kms.syncobj_state.as_mut() } } - -delegate_drm_syncobj!(State); diff --git a/src/wayland/handlers/fixes.rs b/src/wayland/handlers/fixes.rs deleted file mode 100644 index b589aabc7..000000000 --- a/src/wayland/handlers/fixes.rs +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -use crate::state::State; -use smithay::delegate_fixes; - -delegate_fixes!(State); diff --git a/src/wayland/handlers/foreign_toplevel_list.rs b/src/wayland/handlers/foreign_toplevel_list.rs index 3954ef674..4d075256d 100644 --- a/src/wayland/handlers/foreign_toplevel_list.rs +++ b/src/wayland/handlers/foreign_toplevel_list.rs @@ -10,5 +10,3 @@ impl ForeignToplevelListHandler for State { &mut self.toplevel_info_state_mut().foreign_toplevel_list } } - -smithay::delegate_foreign_toplevel_list!(State); diff --git a/src/wayland/handlers/fractional_scale.rs b/src/wayland/handlers/fractional_scale.rs index c68062edb..aea0cc7ee 100644 --- a/src/wayland/handlers/fractional_scale.rs +++ b/src/wayland/handlers/fractional_scale.rs @@ -1,6 +1,5 @@ use crate::{state::State, utils::prelude::SeatExt}; use smithay::{ - delegate_fractional_scale, desktop::utils::surface_primary_scanout_output, reexports::wayland_server::protocol::wl_surface::WlSurface, wayland::{ @@ -55,5 +54,3 @@ impl FractionalScaleHandler for State { }); } } - -delegate_fractional_scale!(State); diff --git a/src/wayland/handlers/idle_inhibit.rs b/src/wayland/handlers/idle_inhibit.rs index 403b5d3ed..26e34bf89 100644 --- a/src/wayland/handlers/idle_inhibit.rs +++ b/src/wayland/handlers/idle_inhibit.rs @@ -1,5 +1,5 @@ use smithay::{ - delegate_idle_inhibit, reexports::wayland_server::protocol::wl_surface::WlSurface, + reexports::wayland_server::protocol::wl_surface::WlSurface, wayland::idle_inhibit::IdleInhibitHandler, }; @@ -16,4 +16,3 @@ impl IdleInhibitHandler for State { self.common.refresh_idle_inhibit(); } } -delegate_idle_inhibit!(State); diff --git a/src/wayland/handlers/idle_notify.rs b/src/wayland/handlers/idle_notify.rs index f606f2669..9e5f5584b 100644 --- a/src/wayland/handlers/idle_notify.rs +++ b/src/wayland/handlers/idle_notify.rs @@ -1,4 +1,4 @@ -use smithay::{delegate_idle_notify, wayland::idle_notify::IdleNotifierHandler}; +use smithay::wayland::idle_notify::IdleNotifierHandler; use crate::state::State; @@ -9,4 +9,3 @@ impl IdleNotifierHandler for State { &mut self.common.idle_notifier_state } } -delegate_idle_notify!(State); diff --git a/src/wayland/handlers/image_capture_source.rs b/src/wayland/handlers/image_capture_source.rs index 32858c2d2..86df11831 100644 --- a/src/wayland/handlers/image_capture_source.rs +++ b/src/wayland/handlers/image_capture_source.rs @@ -52,8 +52,4 @@ impl ToplevelCaptureSourceHandler for State { } } -smithay::delegate_image_capture_source!(State); -smithay::delegate_output_capture_source!(State); -smithay::delegate_toplevel_capture_source!(State); - delegate_cosmic_image_capture_source!(State); diff --git a/src/wayland/handlers/image_copy_capture/mod.rs b/src/wayland/handlers/image_copy_capture/mod.rs index d84f6a522..733e05ef2 100644 --- a/src/wayland/handlers/image_copy_capture/mod.rs +++ b/src/wayland/handlers/image_copy_capture/mod.rs @@ -449,5 +449,3 @@ fn constraints_for_renderer( constraints } - -smithay::delegate_image_copy_capture!(State); diff --git a/src/wayland/handlers/input_method.rs b/src/wayland/handlers/input_method.rs index 8b92461b7..081d8043e 100644 --- a/src/wayland/handlers/input_method.rs +++ b/src/wayland/handlers/input_method.rs @@ -2,7 +2,6 @@ use crate::state::State; use smithay::{ - delegate_input_method_manager, desktop::{PopupKind, PopupManager, space::SpaceElement}, reexports::wayland_server::protocol::wl_surface::WlSurface, utils::Rectangle, @@ -41,5 +40,3 @@ impl InputMethodHandler for State { self.common.shell.read().unconstrain_popup(&popup.into()); } } - -delegate_input_method_manager!(State); diff --git a/src/wayland/handlers/keyboard_shortcuts_inhibit.rs b/src/wayland/handlers/keyboard_shortcuts_inhibit.rs index e1a2978d3..dc25d20a1 100644 --- a/src/wayland/handlers/keyboard_shortcuts_inhibit.rs +++ b/src/wayland/handlers/keyboard_shortcuts_inhibit.rs @@ -1,11 +1,8 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::state::State; -use smithay::{ - delegate_keyboard_shortcuts_inhibit, - wayland::keyboard_shortcuts_inhibit::{ - KeyboardShortcutsInhibitHandler, KeyboardShortcutsInhibitState, KeyboardShortcutsInhibitor, - }, +use smithay::wayland::keyboard_shortcuts_inhibit::{ + KeyboardShortcutsInhibitHandler, KeyboardShortcutsInhibitState, KeyboardShortcutsInhibitor, }; impl KeyboardShortcutsInhibitHandler for State { @@ -18,5 +15,3 @@ impl KeyboardShortcutsInhibitHandler for State { inhibitor.activate(); } } - -delegate_keyboard_shortcuts_inhibit!(State); diff --git a/src/wayland/handlers/layer_shell.rs b/src/wayland/handlers/layer_shell.rs index 5806a70f8..9653557d7 100644 --- a/src/wayland/handlers/layer_shell.rs +++ b/src/wayland/handlers/layer_shell.rs @@ -2,7 +2,6 @@ use crate::{shell::PendingLayer, utils::prelude::*}; use smithay::{ - delegate_layer_shell, desktop::{LayerSurface, PopupKind, WindowSurfaceType, layer_map_for_output}, output::Output, reexports::wayland_server::protocol::wl_output::WlOutput, @@ -82,5 +81,3 @@ impl WlrLayerShellHandler for State { } } } - -delegate_layer_shell!(State); diff --git a/src/wayland/handlers/mod.rs b/src/wayland/handlers/mod.rs index d3d22f005..8f6547cff 100644 --- a/src/wayland/handlers/mod.rs +++ b/src/wayland/handlers/mod.rs @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only pub mod a11y; -pub mod alpha_modifier; pub mod buffer; pub mod compositor; pub mod corner_radius; @@ -12,7 +11,6 @@ pub mod dmabuf; pub mod drm; pub mod drm_lease; pub mod drm_syncobj; -pub mod fixes; pub mod foreign_toplevel_list; pub mod fractional_scale; pub mod idle_inhibit; @@ -27,22 +25,15 @@ pub mod output_configuration; pub mod output_power; pub mod overlap_notify; pub mod pointer_constraints; -pub mod pointer_gestures; -pub mod presentation; pub mod primary_selection; -pub mod relative_pointer; pub mod seat; pub mod security_context; pub mod selection; pub mod session_lock; pub mod shm; -pub mod single_pixel_buffer; pub mod tablet_manager; -pub mod text_input; pub mod toplevel_info; pub mod toplevel_management; -pub mod viewporter; -pub mod virtual_keyboard; pub mod workspace; pub mod xdg_activation; pub mod xdg_foreign; diff --git a/src/wayland/handlers/output.rs b/src/wayland/handlers/output.rs index f771ed411..9972d0f88 100644 --- a/src/wayland/handlers/output.rs +++ b/src/wayland/handlers/output.rs @@ -1,8 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::state::State; -use smithay::{delegate_output, wayland::output::OutputHandler}; +use smithay::wayland::output::OutputHandler; impl OutputHandler for State {} - -delegate_output!(State); diff --git a/src/wayland/handlers/pointer_constraints.rs b/src/wayland/handlers/pointer_constraints.rs index 55017268d..71e4a4d1f 100644 --- a/src/wayland/handlers/pointer_constraints.rs +++ b/src/wayland/handlers/pointer_constraints.rs @@ -2,7 +2,6 @@ use crate::state::State; use smithay::{ - delegate_pointer_constraints, input::pointer::PointerHandle, reexports::wayland_server::protocol::wl_surface::WlSurface, utils::{Logical, Point}, @@ -34,4 +33,3 @@ impl PointerConstraintsHandler for State { // TODO } } -delegate_pointer_constraints!(State); diff --git a/src/wayland/handlers/pointer_gestures.rs b/src/wayland/handlers/pointer_gestures.rs deleted file mode 100644 index dc950d802..000000000 --- a/src/wayland/handlers/pointer_gestures.rs +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -use crate::state::State; -use smithay::delegate_pointer_gestures; - -delegate_pointer_gestures!(State); diff --git a/src/wayland/handlers/presentation.rs b/src/wayland/handlers/presentation.rs deleted file mode 100644 index 96dd14e71..000000000 --- a/src/wayland/handlers/presentation.rs +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -use crate::state::State; -use smithay::delegate_presentation; - -delegate_presentation!(State); diff --git a/src/wayland/handlers/primary_selection.rs b/src/wayland/handlers/primary_selection.rs index 8a594305e..2b6342782 100644 --- a/src/wayland/handlers/primary_selection.rs +++ b/src/wayland/handlers/primary_selection.rs @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::state::State; -use smithay::{ - delegate_primary_selection, - wayland::selection::primary_selection::{PrimarySelectionHandler, PrimarySelectionState}, +use smithay::wayland::selection::primary_selection::{ + PrimarySelectionHandler, PrimarySelectionState, }; impl PrimarySelectionHandler for State { @@ -11,5 +10,3 @@ impl PrimarySelectionHandler for State { &mut self.common.primary_selection_state } } - -delegate_primary_selection!(State); diff --git a/src/wayland/handlers/relative_pointer.rs b/src/wayland/handlers/relative_pointer.rs deleted file mode 100644 index 6900dec93..000000000 --- a/src/wayland/handlers/relative_pointer.rs +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -use crate::state::State; -use smithay::delegate_relative_pointer; - -delegate_relative_pointer!(State); diff --git a/src/wayland/handlers/seat.rs b/src/wayland/handlers/seat.rs index f092ce19b..10931be24 100644 --- a/src/wayland/handlers/seat.rs +++ b/src/wayland/handlers/seat.rs @@ -6,10 +6,7 @@ use crate::{ state::State, utils::prelude::SeatExt, }; -use smithay::{ - delegate_cursor_shape, delegate_seat, - input::{SeatHandler, SeatState, keyboard::LedState, pointer::CursorImageStatus}, -}; +use smithay::input::{SeatHandler, SeatState, keyboard::LedState, pointer::CursorImageStatus}; impl SeatHandler for State { type KeyboardFocus = KeyboardFocusTarget; @@ -37,6 +34,3 @@ impl SeatHandler for State { devices.update_led_state(led_state); } } - -delegate_seat!(State); -delegate_cursor_shape!(State); diff --git a/src/wayland/handlers/security_context.rs b/src/wayland/handlers/security_context.rs index b715afdf4..bcd26857c 100644 --- a/src/wayland/handlers/security_context.rs +++ b/src/wayland/handlers/security_context.rs @@ -1,7 +1,6 @@ use crate::state::{ClientState, State}; use smithay::{ backend::drm::DrmNode, - delegate_security_context, wayland::security_context::{ SecurityContext, SecurityContextHandler, SecurityContextListenerSource, }, @@ -54,4 +53,3 @@ impl SecurityContextHandler for State { .expect("Failed to init the wayland socket source."); } } -delegate_security_context!(State); diff --git a/src/wayland/handlers/session_lock.rs b/src/wayland/handlers/session_lock.rs index 68043b97a..39e1e3759 100644 --- a/src/wayland/handlers/session_lock.rs +++ b/src/wayland/handlers/session_lock.rs @@ -2,7 +2,6 @@ use crate::{shell::SessionLock, state::State, utils::prelude::*}; use smithay::{ - delegate_session_lock, output::Output, reexports::wayland_server::{Resource, protocol::wl_output::WlOutput}, utils::Size, @@ -68,5 +67,3 @@ impl SessionLockHandler for State { } } } - -delegate_session_lock!(State); diff --git a/src/wayland/handlers/shm.rs b/src/wayland/handlers/shm.rs index 9b2f7d9bb..7f4fca88a 100644 --- a/src/wayland/handlers/shm.rs +++ b/src/wayland/handlers/shm.rs @@ -1,15 +1,10 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::state::State; -use smithay::{ - delegate_shm, - wayland::shm::{ShmHandler, ShmState}, -}; +use smithay::wayland::shm::{ShmHandler, ShmState}; impl ShmHandler for State { fn shm_state(&self) -> &ShmState { &self.common.shm_state } } - -delegate_shm!(State); diff --git a/src/wayland/handlers/single_pixel_buffer.rs b/src/wayland/handlers/single_pixel_buffer.rs deleted file mode 100644 index b010828b6..000000000 --- a/src/wayland/handlers/single_pixel_buffer.rs +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -use crate::state::State; -use smithay::delegate_single_pixel_buffer; - -delegate_single_pixel_buffer!(State); diff --git a/src/wayland/handlers/tablet_manager.rs b/src/wayland/handlers/tablet_manager.rs index 9c324bc1a..60469ba99 100644 --- a/src/wayland/handlers/tablet_manager.rs +++ b/src/wayland/handlers/tablet_manager.rs @@ -2,8 +2,8 @@ use crate::state::State; use smithay::{ - backend::input::TabletToolDescriptor, delegate_tablet_manager, - input::pointer::CursorImageStatus, wayland::tablet_manager::TabletSeatHandler, + backend::input::TabletToolDescriptor, input::pointer::CursorImageStatus, + wayland::tablet_manager::TabletSeatHandler, }; impl TabletSeatHandler for State { @@ -11,5 +11,3 @@ impl TabletSeatHandler for State { // TODO display cursor for each tablet tool } } - -delegate_tablet_manager!(State); diff --git a/src/wayland/handlers/text_input.rs b/src/wayland/handlers/text_input.rs deleted file mode 100644 index fb4f53b3f..000000000 --- a/src/wayland/handlers/text_input.rs +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -use crate::state::State; -use smithay::delegate_text_input_manager; - -delegate_text_input_manager!(State); diff --git a/src/wayland/handlers/viewporter.rs b/src/wayland/handlers/viewporter.rs deleted file mode 100644 index ffa830930..000000000 --- a/src/wayland/handlers/viewporter.rs +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -use crate::state::State; -use smithay::delegate_viewporter; - -delegate_viewporter!(State); diff --git a/src/wayland/handlers/virtual_keyboard.rs b/src/wayland/handlers/virtual_keyboard.rs deleted file mode 100644 index f39ff22a6..000000000 --- a/src/wayland/handlers/virtual_keyboard.rs +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -use crate::state::State; -use smithay::delegate_virtual_keyboard_manager; - -delegate_virtual_keyboard_manager!(State); diff --git a/src/wayland/handlers/xdg_activation.rs b/src/wayland/handlers/xdg_activation.rs index 2ec745e4f..b9674e384 100644 --- a/src/wayland/handlers/xdg_activation.rs +++ b/src/wayland/handlers/xdg_activation.rs @@ -6,7 +6,6 @@ use crate::{ wayland::protocols::workspace::{State as WState, WorkspaceHandle}, }; use smithay::{ - delegate_xdg_activation, input::Seat, reexports::wayland_server::protocol::wl_surface::WlSurface, wayland::xdg_activation::{ @@ -246,5 +245,3 @@ impl State { }; } } - -delegate_xdg_activation!(State); diff --git a/src/wayland/handlers/xdg_foreign.rs b/src/wayland/handlers/xdg_foreign.rs index 7749945b2..801e4c294 100644 --- a/src/wayland/handlers/xdg_foreign.rs +++ b/src/wayland/handlers/xdg_foreign.rs @@ -1,15 +1,10 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::state::State; -use smithay::{ - delegate_xdg_foreign, - wayland::xdg_foreign::{XdgForeignHandler, XdgForeignState}, -}; +use smithay::wayland::xdg_foreign::{XdgForeignHandler, XdgForeignState}; impl XdgForeignHandler for State { fn xdg_foreign_state(&mut self) -> &mut XdgForeignState { &mut self.common.xdg_foreign_state } } - -delegate_xdg_foreign!(State); diff --git a/src/wayland/handlers/xdg_shell/mod.rs b/src/wayland/handlers/xdg_shell/mod.rs index 20a3a1191..bd75e4d71 100644 --- a/src/wayland/handlers/xdg_shell/mod.rs +++ b/src/wayland/handlers/xdg_shell/mod.rs @@ -6,7 +6,6 @@ use crate::{ }; use smithay::desktop::layer_map_for_output; use smithay::{ - delegate_xdg_shell, desktop::{ PopupGrab, PopupKeyboardGrab, PopupKind, PopupPointerGrab, PopupUngrabStrategy, WindowSurfaceType, find_popup_root_surface, @@ -391,5 +390,3 @@ impl XdgShellHandler for State { } } } - -delegate_xdg_shell!(State); diff --git a/src/wayland/handlers/xwayland_keyboard_grab.rs b/src/wayland/handlers/xwayland_keyboard_grab.rs index 1c99409a8..b2b16b7d1 100644 --- a/src/wayland/handlers/xwayland_keyboard_grab.rs +++ b/src/wayland/handlers/xwayland_keyboard_grab.rs @@ -2,7 +2,6 @@ use crate::{shell::focus::target::KeyboardFocusTarget, state::State}; use smithay::{ - delegate_xwayland_keyboard_grab, input::Seat, reexports::wayland_server::{Resource, protocol::wl_surface::WlSurface}, wayland::xwayland_keyboard_grab::{XWaylandKeyboardGrab, XWaylandKeyboardGrabHandler}, @@ -49,5 +48,3 @@ impl XWaylandGrabSeat for Seat { .is_some_and(|(s, g)| g.grab().is_alive() && s == surface) } } - -delegate_xwayland_keyboard_grab!(State); diff --git a/src/wayland/handlers/xwayland_shell.rs b/src/wayland/handlers/xwayland_shell.rs index a710c7085..eaa743503 100644 --- a/src/wayland/handlers/xwayland_shell.rs +++ b/src/wayland/handlers/xwayland_shell.rs @@ -1,15 +1,10 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::state::State; -use smithay::{ - delegate_xwayland_shell, - wayland::xwayland_shell::{XWaylandShellHandler, XWaylandShellState}, -}; +use smithay::wayland::xwayland_shell::{XWaylandShellHandler, XWaylandShellState}; impl XWaylandShellHandler for State { fn xwayland_shell_state(&mut self) -> &mut XWaylandShellState { &mut self.common.xwayland_shell_state } } - -delegate_xwayland_shell!(State); diff --git a/src/wayland/protocols/overlap_notify.rs b/src/wayland/protocols/overlap_notify.rs index 653c98c1e..6eae9a0c1 100644 --- a/src/wayland/protocols/overlap_notify.rs +++ b/src/wayland/protocols/overlap_notify.rs @@ -16,7 +16,10 @@ use smithay::{ desktop::{LayerSurface, layer_map_for_output}, output::Output, reexports::{ - wayland_protocols::ext::foreign_toplevel_list::v1::server::ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1, + wayland_protocols::ext::foreign_toplevel_list::v1::server::{ + ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1, + ext_foreign_toplevel_list_v1::ExtForeignToplevelListV1, + }, wayland_protocols_wlr::layer_shell::v1::server::{ zwlr_layer_shell_v1::Layer as WlrLayer, zwlr_layer_surface_v1::ZwlrLayerSurfaceV1, }, @@ -24,7 +27,9 @@ use smithay::{ }, utils::{Logical, Rectangle}, wayland::{ - foreign_toplevel_list::ForeignToplevelListHandler, + foreign_toplevel_list::{ + ForeignToplevelHandle, ForeignToplevelListGlobalData, ForeignToplevelListHandler, + }, shell::wlr_layer::{ExclusiveZone, Layer}, }, }; @@ -81,6 +86,8 @@ impl OverlapNotifyState { + GlobalDispatch + Dispatch + Dispatch> + + GlobalDispatch + + Dispatch + ForeignToplevelListHandler + ToplevelInfoHandler + 'static, diff --git a/src/wayland/protocols/toplevel_info.rs b/src/wayland/protocols/toplevel_info.rs index db0f29293..1348b8e71 100644 --- a/src/wayland/protocols/toplevel_info.rs +++ b/src/wayland/protocols/toplevel_info.rs @@ -5,7 +5,10 @@ use std::{collections::HashSet, sync::Mutex}; use smithay::{ output::Output, reexports::{ - wayland_protocols::ext::foreign_toplevel_list::v1::server::ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1, + wayland_protocols::ext::foreign_toplevel_list::v1::server::{ + ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1, + ext_foreign_toplevel_list_v1::ExtForeignToplevelListV1, + }, wayland_server::{ Client, DataInit, Dispatch, DisplayHandle, GlobalDispatch, New, Resource, Weak, backend::{ClientId, GlobalId}, @@ -14,7 +17,8 @@ use smithay::{ }, utils::{IsAlive, Logical, Rectangle, user_data::UserDataMap}, wayland::foreign_toplevel_list::{ - ForeignToplevelHandle, ForeignToplevelListHandler, ForeignToplevelListState, + ForeignToplevelHandle, ForeignToplevelListGlobalData, ForeignToplevelListHandler, + ForeignToplevelListState, }, }; @@ -302,6 +306,8 @@ where D: GlobalDispatch + Dispatch + Dispatch> + + GlobalDispatch + + Dispatch + ForeignToplevelListHandler + ToplevelInfoHandler + 'static,