diff --git a/src/backend/drm/gbm.rs b/src/backend/drm/gbm.rs index e3d75236c132..dd8b45e71bf6 100644 --- a/src/backend/drm/gbm.rs +++ b/src/backend/drm/gbm.rs @@ -63,7 +63,7 @@ impl Framebuffer for GbmFramebuffer { /// Attach a framebuffer for a [`WlBuffer`] /// /// This tries to import the buffer to gbm and attach a [`framebuffer::Handle`] for -/// the imported [`BufferObject`]. +/// the imported [`BufferObject`][gbm::BufferObject]. /// /// Returns `Ok(None)` for unknown buffer types and buffer types that do not /// support attaching a framebuffer (e.g. shm-buffers) @@ -136,7 +136,7 @@ pub enum Error { /// Attach a framebuffer for a [`Dmabuf`] /// /// This tries to import the [`Dmabuf`] using gbm and attach -/// a [`framebuffer::Handle`] for the imported [`BufferObject`] +/// a [`framebuffer::Handle`] for the imported [`BufferObject`][gbm::BufferObject] #[profiling::function] pub fn framebuffer_from_dmabuf( drm: &DrmDeviceFd, @@ -181,7 +181,7 @@ pub fn framebuffer_from_dmabuf( }) } -/// Attach a [`framebuffer::Handle`] to an [`BufferObject`] +/// Attach a [`framebuffer::Handle`] to an [`BufferObject`][gbm::BufferObject] #[profiling::function] pub fn framebuffer_from_bo( drm: &DrmDeviceFd, diff --git a/src/backend/renderer/color.rs b/src/backend/renderer/color.rs index 5db441a09155..60970b80a907 100644 --- a/src/backend/renderer/color.rs +++ b/src/backend/renderer/color.rs @@ -5,7 +5,7 @@ use std::ops::Mul; pub struct Color32F([f32; 4]); impl Color32F { - /// Initialize a new [`Color`] + /// Initialize a new [`Color32F`] #[inline] pub const fn new(r: f32, g: f32, b: f32, a: f32) -> Self { Self([r, g, b, a]) diff --git a/src/backend/renderer/multigpu/gbm.rs b/src/backend/renderer/multigpu/gbm.rs index f561d4db4ff1..e89b2fc1928d 100644 --- a/src/backend/renderer/multigpu/gbm.rs +++ b/src/backend/renderer/multigpu/gbm.rs @@ -126,7 +126,7 @@ impl GbmGlesBackend { /// Sets the default flags to use for allocating buffers via the [`GbmAllocator`] /// provided by these backends devices. /// - /// Only affects nodes added via [`add_node`] *after* calling this method. + /// Only affects nodes added via [`add_node`][Self::add_node] *after* calling this method. pub fn set_allocator_flags(&mut self, flags: GbmBufferFlags) { self.allocator_flags = flags; } diff --git a/src/backend/renderer/multigpu/mod.rs b/src/backend/renderer/multigpu/mod.rs index 78c43e065ade..c2fbb61c01ba 100644 --- a/src/backend/renderer/multigpu/mod.rs +++ b/src/backend/renderer/multigpu/mod.rs @@ -5,7 +5,7 @@ //! [`GraphicsApi`] implementation will allow you to create [`MultiRenderer`]s. //! //! smithay provides the following graphics apis: -//! - [`egl::EglGlesBackend`] +//! - [`gbm::GbmGlesBackend`] //! //! A [`MultiRenderer`] gets created using two [`DrmNode`]s to identify gpus. //! One gpu will be referred to as the render-gpu, the other as the target-gpu. diff --git a/src/desktop/space/element/mod.rs b/src/desktop/space/element/mod.rs index b4e40a6df377..749ea61ca394 100644 --- a/src/desktop/space/element/mod.rs +++ b/src/desktop/space/element/mod.rs @@ -430,7 +430,7 @@ macro_rules! space_elements_internal { } /// Aggregate multiple types implementing [`SpaceElement`] into a single enum type to be used -/// with a [`Space`]. +/// with a [`Space`][super::Space]. /// /// # Example /// diff --git a/src/utils/clock.rs b/src/utils/clock.rs index 015a9f27e2ee..bc44a39a3588 100644 --- a/src/utils/clock.rs +++ b/src/utils/clock.rs @@ -69,7 +69,7 @@ impl Time { /// Returns the time in milliseconds /// /// This should match timestamps from libinput: - /// https://wayland.freedesktop.org/libinput/doc/latest/timestamps.html + /// pub fn as_millis(&self) -> u32 { // Assume monotonic clock (but not realitime) fits as milliseconds in 32-bit debug_assert!(self.tp.tv_sec >= 0); @@ -80,7 +80,7 @@ impl Time { /// Returns the time in microseconds /// /// This should match timestamps from libinput: - /// https://wayland.freedesktop.org/libinput/doc/latest/timestamps.html + /// pub fn as_micros(&self) -> u64 { // Assume monotonic clock (but not realitime) fits as microseconds in 64-bit debug_assert!(self.tp.tv_sec >= 0); diff --git a/src/wayland/commit_timing/mod.rs b/src/wayland/commit_timing/mod.rs index a9788e1fe664..c92ff4612031 100644 --- a/src/wayland/commit_timing/mod.rs +++ b/src/wayland/commit_timing/mod.rs @@ -108,7 +108,7 @@ pub struct CommitTimingManagerState { impl CommitTimingManagerState { /// Create a new [`WpCommitTimingManagerV1`] global // - /// The id provided by [`FifoManagerState::global`] may be used to + /// The id provided by [`CommitTimingManagerState::global`] may be used to /// remove or disable this global in the future. pub fn new(display: &DisplayHandle) -> Self where @@ -121,7 +121,7 @@ impl CommitTimingManagerState { /// Create a new unmanaged [`WpCommitTimingManagerV1`] global // - /// The id provided by [`FifoManagerState::global`] may be used to + /// The id provided by [`CommitTimingManagerState::global`] may be used to /// remove or disable this global in the future. pub fn unmanaged(display: &DisplayHandle) -> Self where @@ -143,12 +143,12 @@ impl CommitTimingManagerState { Self { global, is_managed } } - /// Returns the id of the [`WpFifoManagerV1`] global. + /// Returns the id of the [`WpCommitTimingManagerV1`] global. pub fn global(&self) -> GlobalId { self.global.clone() } - /// Returns if this [`FifoManagerState`] operates in managed mode. + /// Returns if this [`CommitTimingManagerState`] operates in managed mode. pub fn is_managed(&self) -> bool { self.is_managed } diff --git a/src/wayland/foreign_toplevel_list/mod.rs b/src/wayland/foreign_toplevel_list/mod.rs index eacb15aaad52..3637f1ed373b 100644 --- a/src/wayland/foreign_toplevel_list/mod.rs +++ b/src/wayland/foreign_toplevel_list/mod.rs @@ -162,7 +162,7 @@ impl ForeignToplevelHandle { resource.data::().cloned() } - /// Retrieve [`ExtForeignToplevelHandleV1`](wayland_protocols::ext::foreign_toplevel_list::v1::server::ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1) + /// Retrieve [`ExtForeignToplevelHandleV1`] /// instances for this handle. pub fn resources(&self) -> Vec { let inner = self.inner.0.lock().unwrap(); @@ -173,8 +173,8 @@ impl ForeignToplevelHandle { .collect() } - /// Retrieve [`ExtForeignToplevelHandleV1`](wayland_protocols::ext::foreign_toplevel_list::v1::server::ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1) - /// instances for this handle of a given [`Client`](wayland_server::Client). + /// Retrieve [`ExtForeignToplevelHandleV1`] + /// instances for this handle of a given [`Client`]. pub fn resources_for_client(&self, client: &Client) -> Vec { self.resources() .into_iter() @@ -189,7 +189,7 @@ impl ForeignToplevelHandle { /// The title of the toplevel has changed. /// - /// [Self::done] has to be called to finalize the update + /// [Self::send_done] has to be called to finalize the update pub fn send_title(&self, title: &str) { let mut inner = self.inner.0.lock().unwrap(); if inner.title == title { @@ -207,7 +207,7 @@ impl ForeignToplevelHandle { /// The app_id of the toplevel has changed. /// - /// [Self::done] has to be called to finalize the update + /// [Self::send_done] has to be called to finalize the update pub fn send_app_id(&self, app_id: &str) { let mut inner = self.inner.0.lock().unwrap(); if inner.app_id == app_id { diff --git a/src/wayland/xdg_system_bell.rs b/src/wayland/xdg_system_bell.rs index 648fa2e467a6..dce6eb06e433 100644 --- a/src/wayland/xdg_system_bell.rs +++ b/src/wayland/xdg_system_bell.rs @@ -2,8 +2,8 @@ //! //! This protocol enables clients to ring the system bell. //! -//! In order to advertise system bell global call [XdgSystemBellState::new] and delegate -//! events to it with [delegate_xdg_system_bell]. +//! In order to advertise system bell global call [`XdgSystemBellState::new`] and delegate +//! events to it with [`delegate_xdg_system_bell`][crate::delegate_xdg_system_bell]. //! //! ``` //! use smithay::wayland::xdg_system_bell::{XdgSystemBellState, XdgSystemBellHandler}; diff --git a/src/wayland/xdg_toplevel_icon.rs b/src/wayland/xdg_toplevel_icon.rs index e67ef29c6f28..13577997e4f3 100644 --- a/src/wayland/xdg_toplevel_icon.rs +++ b/src/wayland/xdg_toplevel_icon.rs @@ -3,7 +3,7 @@ //! This protocol allows clients to set icons for their toplevel surfaces either via the XDG icon stock (using an icon name), or from pixel data. //! //! In order to advertise toplevel icon global call [XdgToplevelIconManager::new] and delegate -//! events to it with [delegate_xdg_toplevel_icon]. +//! events to it with [`delegate_xdg_toplevel_icon`][crate::delegate_xdg_toplevel_icon]. //! Currently attached icon is available in double-buffered [ToplevelIconCachedState] use std::{ diff --git a/src/xwayland/xwm/mod.rs b/src/xwayland/xwm/mod.rs index 779cf4a871b3..0549aa17d514 100644 --- a/src/xwayland/xwm/mod.rs +++ b/src/xwayland/xwm/mod.rs @@ -9,13 +9,13 @@ //! To use this functionality you must first spawn an //! [`XWayland`](super::XWayland) instance to attach a [`X11Wm`] to. //! -//! # Associating an [X11Surface] with a [WlSurface] +//! # Associating an [`X11Surface`] with a [`WlSurface`][wayland_server::protocol::wl_surface::WlSurface] //! //! When an X11 window is created, XWayland will associate it with a //! `wl_surface` that it creates via the wayland connection. This happens in two //! steps: //! -//! - Via the [xwayland shell](crate::wayland::xwayland::shell) protocol, a +//! - Via the [xwayland shell](crate::wayland::xwayland_shell) protocol, a //! serial number is set on the surface, and it is given the //! "xwayland_shell" role. //! - Via the X11 connection, a matching `WL_SURFACE_SERIAL` atom is set on the diff --git a/src/xwayland/xwm/settings.rs b/src/xwayland/xwm/settings.rs index 2924f7382caa..218755d27b6b 100644 --- a/src/xwayland/xwm/settings.rs +++ b/src/xwayland/xwm/settings.rs @@ -1,6 +1,6 @@ //! Types related to XSETTINGS handling //! -//! See https://specifications.freedesktop.org/xsettings-spec/0.5/ +//! See use std::{borrow::Borrow, collections::HashMap, hash::Hash}; diff --git a/src/xwayland/xwm/surface.rs b/src/xwayland/xwm/surface.rs index f6fdccf75f7f..8e9fbe3f0700 100644 --- a/src/xwayland/xwm/surface.rs +++ b/src/xwayland/xwm/surface.rs @@ -337,7 +337,7 @@ impl X11Surface { /// /// XWayland will set this if it has bound the [xwayland /// shell](crate::wayland::xwayland_shell) protocol on the wayland side. - /// Otherwise, it will set [wl_surface_id] instead. + /// Otherwise, it will set [`wl_surface_id`][Self::wl_surface_id] instead. pub fn wl_surface_serial(&self) -> Option { self.state.lock().unwrap().wl_surface_serial }