diff --git a/src/client.rs b/src/client.rs index 28b71eaf..706f5ddc 100644 --- a/src/client.rs +++ b/src/client.rs @@ -48,27 +48,6 @@ mod error; mod objects; mod tasks; -bitflags! { - ClientCaps: u32; - CAP_DATA_CONTROL_MANAGER = 1 << 0, - CAP_VIRTUAL_KEYBOARD_MANAGER = 1 << 1, - CAP_FOREIGN_TOPLEVEL_LIST = 1 << 2, - CAP_IDLE_NOTIFIER = 1 << 3, - CAP_SESSION_LOCK_MANAGER = 1 << 4, - CAP_JAY_COMPOSITOR = 1 << 5, - CAP_LAYER_SHELL = 1 << 6, - CAP_SCREENCOPY_MANAGER = 1 << 7, - CAP_SEAT_MANAGER = 1 << 8, - CAP_DRM_LEASE = 1 << 9, - CAP_INPUT_METHOD = 1 << 10, - CAP_WORKSPACE = 1 << 11, - CAP_FOREIGN_TOPLEVEL_MANAGER = 1 << 12, - CAP_HEAD_MANAGER = 1 << 13, - CAP_GAMMA_CONTROL_MANAGER = 1 << 14, - CAP_VIRTUAL_POINTER_MANAGER = 1 << 15, - CAP_FOREIGN_TOPLEVEL_GEOMETRY_TRACKING = 1 << 16, -} - #[derive(Debug, Copy, Clone, Hash, Ord, PartialOrd, Eq, PartialEq)] pub struct ClientId(u64); @@ -220,13 +199,12 @@ impl Clients { } } - pub fn broadcast(&self, required_caps: ClientCaps, xwayland_only: bool, mut f: B) + pub fn broadcast(&self, xwayland_only: bool, mut f: B) where B: FnMut(&Rc), { let clients = self.clients.borrow(); for client in clients.values() { - let _ = required_caps; if !xwayland_only || client.data.is_xwayland { f(&client.data); } diff --git a/src/globals.rs b/src/globals.rs index 963f3ccd..ca56d39d 100644 --- a/src/globals.rs +++ b/src/globals.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{Client, ClientCaps}, + client::Client, ifs::{ color_management::wp_color_manager_v1::WpColorManagerV1Global, ext_foreign_toplevel_image_capture_source_manager_v1::ExtForeignToplevelImageCaptureSourceManagerV1Global, @@ -121,9 +121,6 @@ pub trait GlobalBase { pub trait Global: GlobalBase { fn version(&self) -> u32; - fn required_caps(&self) -> ClientCaps { - ClientCaps::none() - } fn xwayland_only(&self) -> bool { false } @@ -131,12 +128,11 @@ pub trait Global: GlobalBase { let _ = state; true } - fn permitted(&self, caps: ClientCaps, xwayland: bool) -> bool { - let _ = caps; + fn permitted(&self, xwayland: bool) -> bool { xwayland || !self.xwayland_only() } - fn not_permitted(&self, caps: ClientCaps, xwayland: bool) -> bool { - !self.permitted(caps, xwayland) + fn not_permitted(&self, xwayland: bool) -> bool { + !self.permitted(xwayland) } } @@ -281,19 +277,16 @@ impl Globals { fn insert(&self, state: &State, global: Rc) { self.insert_no_broadcast_(&global); - self.broadcast(state, global.required_caps(), global.xwayland_only(), |r| { - r.handle_global(&global) - }); + self.broadcast(state, global.xwayland_only(), |r| r.handle_global(&global)); } pub fn get( &self, name: GlobalName, - client_caps: ClientCaps, allow_xwayland_only: bool, ) -> Result, GlobalsError> { let global = self.take(name, false)?; - if global.not_permitted(client_caps, allow_xwayland_only) { + if global.not_permitted(allow_xwayland_only) { return Err(GlobalsError::GlobalDoesNotExist(name)); } Ok(global) @@ -310,7 +303,7 @@ impl Globals { assert_eq!(global.name(), replacement.name()); assert_eq!(global.interface().0, replacement.interface().0); self.removed.set(global.name(), replacement); - self.broadcast(state, global.required_caps(), global.xwayland_only(), |r| { + self.broadcast(state, global.xwayland_only(), |r| { r.handle_global_removed(&**global) }); Ok(()) @@ -321,7 +314,6 @@ impl Globals { } pub fn notify_all(&self, registry: &Rc) { - let caps = ClientCaps::all(); let xwayland = registry.client.is_xwayland; let globals = self.registry.lock(); macro_rules! emit { @@ -329,7 +321,7 @@ impl Globals { for global in globals.values() { if global.singleton().is_some() == $singleton { if global.exposed(®istry.client.state) - && global.permitted(caps, xwayland) + && global.permitted(xwayland) { registry.handle_global(global); } @@ -344,11 +336,10 @@ impl Globals { fn broadcast)>( &self, state: &State, - required_caps: ClientCaps, xwayland_only: bool, f: F, ) { - state.clients.broadcast(required_caps, xwayland_only, |c| { + state.clients.broadcast(xwayland_only, |c| { let registries = c.lock_registries(); for registry in registries.values() { f(registry); @@ -405,10 +396,9 @@ impl Globals { } for client in state.clients.clients.borrow().values() { let client = &client.data; - let caps = ClientCaps::all(); let xwayland = client.is_xwayland; for global in &singletons { - if global.permitted(caps, xwayland) { + if global.permitted(xwayland) { for registry in client.objects.registries.lock().values() { registry.handle_global(global); } diff --git a/src/ifs/data_transfer/data_control/ext_data_control_manager_v1.rs b/src/ifs/data_transfer/data_control/ext_data_control_manager_v1.rs index 5cfccf24..f7ba13bc 100644 --- a/src/ifs/data_transfer/data_control/ext_data_control_manager_v1.rs +++ b/src/ifs/data_transfer/data_control/ext_data_control_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_DATA_CONTROL_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::data_transfer::{ TransferLocation, @@ -105,10 +105,6 @@ impl Global for ExtDataControlManagerV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_DATA_CONTROL_MANAGER - } } simple_add_global!(ExtDataControlManagerV1Global); diff --git a/src/ifs/data_transfer/data_control/zwlr_data_control_manager_v1.rs b/src/ifs/data_transfer/data_control/zwlr_data_control_manager_v1.rs index b0e37764..c737b248 100644 --- a/src/ifs/data_transfer/data_control/zwlr_data_control_manager_v1.rs +++ b/src/ifs/data_transfer/data_control/zwlr_data_control_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_DATA_CONTROL_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::data_transfer::{ TransferLocation, @@ -105,10 +105,6 @@ impl Global for ZwlrDataControlManagerV1Global { fn version(&self) -> u32 { 2 } - - fn required_caps(&self) -> ClientCaps { - CAP_DATA_CONTROL_MANAGER - } } simple_add_global!(ZwlrDataControlManagerV1Global); diff --git a/src/ifs/ext_foreign_toplevel_list_v1.rs b/src/ifs/ext_foreign_toplevel_list_v1.rs index c5421a16..91f4ff74 100644 --- a/src/ifs/ext_foreign_toplevel_list_v1.rs +++ b/src/ifs/ext_foreign_toplevel_list_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_FOREIGN_TOPLEVEL_LIST, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::{ ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1, @@ -137,10 +137,6 @@ impl Global for ExtForeignToplevelListV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_FOREIGN_TOPLEVEL_LIST - } } simple_add_global!(ExtForeignToplevelListV1Global); diff --git a/src/ifs/ext_idle_notifier_v1.rs b/src/ifs/ext_idle_notifier_v1.rs index e239a4f8..6db7b95b 100644 --- a/src/ifs/ext_idle_notifier_v1.rs +++ b/src/ifs/ext_idle_notifier_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_IDLE_NOTIFIER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::ext_idle_notification_v1::ExtIdleNotificationV1, leaks::Tracker, @@ -143,10 +143,6 @@ impl Global for ExtIdleNotifierV1Global { fn version(&self) -> u32 { 2 } - - fn required_caps(&self) -> ClientCaps { - CAP_IDLE_NOTIFIER - } } simple_add_global!(ExtIdleNotifierV1Global); diff --git a/src/ifs/ext_image_copy/ext_image_copy_capture_manager_v1.rs b/src/ifs/ext_image_copy/ext_image_copy_capture_manager_v1.rs index 77ad9b55..9ddb2bf6 100644 --- a/src/ifs/ext_image_copy/ext_image_copy_capture_manager_v1.rs +++ b/src/ifs/ext_image_copy/ext_image_copy_capture_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_SCREENCOPY_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::{ ext_image_capture_source_v1::ImageCaptureSource, @@ -145,10 +145,6 @@ impl Global for ExtImageCopyCaptureManagerV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_SCREENCOPY_MANAGER - } } simple_add_global!(ExtImageCopyCaptureManagerV1Global); diff --git a/src/ifs/ext_session_lock_manager_v1.rs b/src/ifs/ext_session_lock_manager_v1.rs index eee71c17..d7ff8853 100644 --- a/src/ifs/ext_session_lock_manager_v1.rs +++ b/src/ifs/ext_session_lock_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_SESSION_LOCK_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::ext_session_lock_v1::ExtSessionLockV1, leaks::Tracker, @@ -94,10 +94,6 @@ impl Global for ExtSessionLockManagerV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_SESSION_LOCK_MANAGER - } } simple_add_global!(ExtSessionLockManagerV1Global); diff --git a/src/ifs/head_management/jay_head_manager_v1.rs b/src/ifs/head_management/jay_head_manager_v1.rs index 5a3e8c3e..33aa9282 100644 --- a/src/ifs/head_management/jay_head_manager_v1.rs +++ b/src/ifs/head_management/jay_head_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_HEAD_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::head_management::{ HeadMgrCommon, head_management_macros::send_available_extensions, @@ -65,10 +65,6 @@ impl Global for JayHeadManagerV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_HEAD_MANAGER - } } pub(super) struct JayHeadManagerV1 { diff --git a/src/ifs/jay_compositor.rs b/src/ifs/jay_compositor.rs index 4e2bcbda..5084abed 100644 --- a/src/ifs/jay_compositor.rs +++ b/src/ifs/jay_compositor.rs @@ -1,7 +1,7 @@ use { crate::{ backend::transaction::BackendConnectorTransactionError, - client::{CAP_JAY_COMPOSITOR, Client, ClientCaps, ClientError, ClientId}, + client::{Client, ClientError, ClientId}, globals::{Global, GlobalName}, ifs::{ jay_client_query::JayClientQuery, @@ -80,10 +80,6 @@ impl Global for JayCompositorGlobal { fn version(&self) -> u32 { 31 } - - fn required_caps(&self) -> ClientCaps { - CAP_JAY_COMPOSITOR - } } simple_add_global!(JayCompositorGlobal); diff --git a/src/ifs/jay_damage_tracking.rs b/src/ifs/jay_damage_tracking.rs index 703f6a1e..386e580e 100644 --- a/src/ifs/jay_damage_tracking.rs +++ b/src/ifs/jay_damage_tracking.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_JAY_COMPOSITOR, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, cmm::cmm_eotf::Eotf, gfx_api::AlphaMode, globals::{Global, GlobalName}, @@ -56,10 +56,6 @@ impl Global for JayDamageTrackingGlobal { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_JAY_COMPOSITOR - } } simple_add_global!(JayDamageTrackingGlobal); diff --git a/src/ifs/wl_registry.rs b/src/ifs/wl_registry.rs index 3b5e62bc..b9de9c26 100644 --- a/src/ifs/wl_registry.rs +++ b/src/ifs/wl_registry.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{Client, ClientCaps}, + client::Client, globals::{Global, GlobalName, GlobalsError, Singleton}, leaks::Tracker, object::{Interface, Object, Version}, @@ -61,7 +61,7 @@ impl WlRegistryRequestHandler for WlRegistry { fn bind(&self, bind: Bind, _slf: &Rc) -> Result<(), Self::Error> { let name = GlobalName::from_raw(bind.name); let globals = &self.client.state.globals; - let global = globals.get(name, ClientCaps::all(), self.client.is_xwayland)?; + let global = globals.get(name, self.client.is_xwayland)?; if global.interface().name() != bind.interface { return Err(WlRegistryError::InvalidInterface(InterfaceError { name: global.name(), diff --git a/src/ifs/wl_seat/ext_transient_seat_manager_v1.rs b/src/ifs/wl_seat/ext_transient_seat_manager_v1.rs index 8bb016a1..b5086be2 100644 --- a/src/ifs/wl_seat/ext_transient_seat_manager_v1.rs +++ b/src/ifs/wl_seat/ext_transient_seat_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_SEAT_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::wl_seat::ext_transient_seat_v1::ExtTransientSeatV1, leaks::Tracker, @@ -55,10 +55,6 @@ impl Global for ExtTransientSeatManagerV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_SEAT_MANAGER - } } simple_add_global!(ExtTransientSeatManagerV1Global); diff --git a/src/ifs/wl_seat/text_input/zwp_input_method_manager_v2.rs b/src/ifs/wl_seat/text_input/zwp_input_method_manager_v2.rs index 9c3d75e4..25a31af1 100644 --- a/src/ifs/wl_seat/text_input/zwp_input_method_manager_v2.rs +++ b/src/ifs/wl_seat/text_input/zwp_input_method_manager_v2.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_INPUT_METHOD, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::wl_seat::text_input::zwp_input_method_v2::ZwpInputMethodV2, leaks::Tracker, @@ -55,10 +55,6 @@ impl Global for ZwpInputMethodManagerV2Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_INPUT_METHOD - } } simple_add_global!(ZwpInputMethodManagerV2Global); diff --git a/src/ifs/wl_seat/zwp_virtual_keyboard_manager_v1.rs b/src/ifs/wl_seat/zwp_virtual_keyboard_manager_v1.rs index 7ed8604f..921485b7 100644 --- a/src/ifs/wl_seat/zwp_virtual_keyboard_manager_v1.rs +++ b/src/ifs/wl_seat/zwp_virtual_keyboard_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_VIRTUAL_KEYBOARD_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::wl_seat::zwp_virtual_keyboard_v1::ZwpVirtualKeyboardV1, keyboard::KeyboardState, @@ -56,10 +56,6 @@ impl Global for ZwpVirtualKeyboardManagerV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_VIRTUAL_KEYBOARD_MANAGER - } } simple_add_global!(ZwpVirtualKeyboardManagerV1Global); diff --git a/src/ifs/wlr_output_manager/zwlr_output_manager_v1.rs b/src/ifs/wlr_output_manager/zwlr_output_manager_v1.rs index a4c116a6..ef8ef48a 100644 --- a/src/ifs/wlr_output_manager/zwlr_output_manager_v1.rs +++ b/src/ifs/wlr_output_manager/zwlr_output_manager_v1.rs @@ -1,7 +1,7 @@ use { crate::{ backend::Mode, - client::{CAP_HEAD_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::wlr_output_manager::{ zwlr_output_configuration_v1::ZwlrOutputConfigurationV1, @@ -276,10 +276,6 @@ impl Global for ZwlrOutputManagerV1Global { fn version(&self) -> u32 { 4 } - - fn required_caps(&self) -> ClientCaps { - CAP_HEAD_MANAGER - } } simple_add_global!(ZwlrOutputManagerV1Global); diff --git a/src/ifs/workspace_manager/ext_workspace_manager_v1.rs b/src/ifs/workspace_manager/ext_workspace_manager_v1.rs index dfa36189..12850ec9 100644 --- a/src/ifs/workspace_manager/ext_workspace_manager_v1.rs +++ b/src/ifs/workspace_manager/ext_workspace_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_WORKSPACE, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::{ wl_output::OutputGlobalOpt, @@ -249,10 +249,6 @@ impl Global for ExtWorkspaceManagerV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_WORKSPACE - } } simple_add_global!(ExtWorkspaceManagerV1Global); diff --git a/src/ifs/wp_drm_lease_device_v1.rs b/src/ifs/wp_drm_lease_device_v1.rs index f438fda3..a9eb8260 100644 --- a/src/ifs/wp_drm_lease_device_v1.rs +++ b/src/ifs/wp_drm_lease_device_v1.rs @@ -1,7 +1,7 @@ use { crate::{ backend::DrmDeviceId, - client::{CAP_DRM_LEASE, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::{ wp_drm_lease_connector_v1::WpDrmLeaseConnectorV1, @@ -84,10 +84,6 @@ impl Global for WpDrmLeaseDeviceV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_DRM_LEASE - } } pub struct WpDrmLeaseDeviceV1 { diff --git a/src/ifs/wp_drm_lease_device_v1/removed_device.rs b/src/ifs/wp_drm_lease_device_v1/removed_device.rs index 20835874..cffe5765 100644 --- a/src/ifs/wp_drm_lease_device_v1/removed_device.rs +++ b/src/ifs/wp_drm_lease_device_v1/removed_device.rs @@ -1,7 +1,7 @@ use { crate::{ backend::DrmDeviceId, - client::{CAP_DRM_LEASE, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName, RemovableWaylandGlobal}, ifs::wp_drm_lease_device_v1::{WpDrmLeaseDeviceV1, WpDrmLeaseDeviceV1Global}, object::Version, @@ -53,10 +53,6 @@ impl Global for RemovedWpDrmLeaseDeviceV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_DRM_LEASE - } } impl RemovableWaylandGlobal for WpDrmLeaseDeviceV1Global { diff --git a/src/ifs/xx_foreign_toplevel_geometry_tracking_manager_v1.rs b/src/ifs/xx_foreign_toplevel_geometry_tracking_manager_v1.rs index c1a23f51..f8ccf931 100644 --- a/src/ifs/xx_foreign_toplevel_geometry_tracking_manager_v1.rs +++ b/src/ifs/xx_foreign_toplevel_geometry_tracking_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_FOREIGN_TOPLEVEL_GEOMETRY_TRACKING, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::{ ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1, @@ -100,10 +100,6 @@ impl Global for XxForeignToplevelGeometryTrackingManagerV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_FOREIGN_TOPLEVEL_GEOMETRY_TRACKING - } } simple_add_global!(XxForeignToplevelGeometryTrackingManagerV1Global); diff --git a/src/ifs/zwlr_foreign_toplevel_manager_v1.rs b/src/ifs/zwlr_foreign_toplevel_manager_v1.rs index f82feb9d..47856ddd 100644 --- a/src/ifs/zwlr_foreign_toplevel_manager_v1.rs +++ b/src/ifs/zwlr_foreign_toplevel_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_FOREIGN_TOPLEVEL_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::{ wl_surface::{x_surface::xwindow::Xwindow, xdg_surface::xdg_toplevel::XdgToplevel}, @@ -129,10 +129,6 @@ impl Global for ZwlrForeignToplevelManagerV1Global { fn version(&self) -> u32 { 3 } - - fn required_caps(&self) -> ClientCaps { - CAP_FOREIGN_TOPLEVEL_MANAGER - } } simple_add_global!(ZwlrForeignToplevelManagerV1Global); diff --git a/src/ifs/zwlr_gamma_control_manager_v1.rs b/src/ifs/zwlr_gamma_control_manager_v1.rs index f2102ee9..e75426de 100644 --- a/src/ifs/zwlr_gamma_control_manager_v1.rs +++ b/src/ifs/zwlr_gamma_control_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_GAMMA_CONTROL_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::zwlr_gamma_control_v1::*, leaks::Tracker, @@ -50,10 +50,6 @@ impl Global for ZwlrGammaControlManagerV1Global { fn version(&self) -> u32 { 1 } - - fn required_caps(&self) -> ClientCaps { - CAP_GAMMA_CONTROL_MANAGER - } } pub struct ZwlrGammaControlManagerV1 { diff --git a/src/ifs/zwlr_layer_shell_v1.rs b/src/ifs/zwlr_layer_shell_v1.rs index 6394fcbe..8301a35f 100644 --- a/src/ifs/zwlr_layer_shell_v1.rs +++ b/src/ifs/zwlr_layer_shell_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_LAYER_SHELL, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::{ wl_output::OutputGlobalOpt, @@ -112,10 +112,6 @@ impl Global for ZwlrLayerShellV1Global { fn version(&self) -> u32 { 5 } - - fn required_caps(&self) -> ClientCaps { - CAP_LAYER_SHELL - } } simple_add_global!(ZwlrLayerShellV1Global); diff --git a/src/ifs/zwlr_screencopy_manager_v1.rs b/src/ifs/zwlr_screencopy_manager_v1.rs index 2ff6c8a4..6254a0c7 100644 --- a/src/ifs/zwlr_screencopy_manager_v1.rs +++ b/src/ifs/zwlr_screencopy_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_SCREENCOPY_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::zwlr_screencopy_frame_v1::ZwlrScreencopyFrameV1, leaks::Tracker, @@ -54,10 +54,6 @@ impl Global for ZwlrScreencopyManagerV1Global { fn version(&self) -> u32 { 3 } - - fn required_caps(&self) -> ClientCaps { - CAP_SCREENCOPY_MANAGER - } } pub struct ZwlrScreencopyManagerV1 { diff --git a/src/ifs/zwlr_virtual_pointer_manager_v1.rs b/src/ifs/zwlr_virtual_pointer_manager_v1.rs index d36fbd17..9746dd0e 100644 --- a/src/ifs/zwlr_virtual_pointer_manager_v1.rs +++ b/src/ifs/zwlr_virtual_pointer_manager_v1.rs @@ -1,6 +1,6 @@ use { crate::{ - client::{CAP_VIRTUAL_POINTER_MANAGER, Client, ClientCaps, ClientError}, + client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::zwlr_virtual_pointer_v1::ZwlrVirtualPointerV1, leaks::Tracker, @@ -53,10 +53,6 @@ impl Global for ZwlrVirtualPointerManagerV1Global { fn version(&self) -> u32 { 2 } - - fn required_caps(&self) -> ClientCaps { - CAP_VIRTUAL_POINTER_MANAGER - } } pub struct ZwlrVirtualPointerManagerV1 {