[Debug Trait] wayland

wayland/compositor
wayland/data_device
wayland/dmabuf
wayland/explicit_synchronization
wayland/output
wayland/seat
wayland/shell
wayland/shm
This commit is contained in:
Poly 2021-02-12 22:13:38 +01:00
parent aa2a0523bf
commit e9eb698dd0
14 changed files with 119 additions and 14 deletions

View File

@ -68,7 +68,7 @@
//! surfaces. See the documentation of the [`roles`](::wayland::compositor::roles) submodule //! surfaces. See the documentation of the [`roles`](::wayland::compositor::roles) submodule
//! for a detailed explanation. //! for a detailed explanation.
use std::{cell::RefCell, rc::Rc, sync::Mutex}; use std::{cell::RefCell, fmt, rc::Rc, sync::Mutex};
mod handlers; mod handlers;
pub mod roles; pub mod roles;
@ -89,6 +89,7 @@ use wayland_server::{
/// Description of which part of a surface /// Description of which part of a surface
/// should be considered damaged and needs to be redrawn /// should be considered damaged and needs to be redrawn
#[derive(Debug)]
pub enum Damage { pub enum Damage {
/// The whole surface must be considered damaged (this is the default) /// The whole surface must be considered damaged (this is the default)
Full, Full,
@ -100,12 +101,13 @@ pub enum Damage {
Buffer(Rectangle), Buffer(Rectangle),
} }
#[derive(Copy, Clone, Default)] #[derive(Debug, Copy, Clone, Default)]
struct Marker<R> { struct Marker<R> {
_r: ::std::marker::PhantomData<R>, _r: ::std::marker::PhantomData<R>,
} }
/// New buffer assignation for a surface /// New buffer assignation for a surface
#[derive(Debug)]
pub enum BufferAssignment { pub enum BufferAssignment {
/// The surface no longer has a buffer attached to it /// The surface no longer has a buffer attached to it
Removed, Removed,
@ -170,6 +172,21 @@ pub struct SurfaceAttributes {
pub user_data: UserDataMap, pub user_data: UserDataMap,
} }
impl fmt::Debug for SurfaceAttributes {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("SurfaceAttributes")
.field("buffer", &self.buffer)
.field("buffer_scale", &self.buffer_scale)
.field("buffer_transform", &self.buffer_transform)
.field("opaque_region", &self.opaque_region)
.field("input_region", &self.input_region)
.field("damage", &self.damage)
.field("frame_callback", &self.frame_callback)
.field("user_data", &"...")
.finish()
}
}
impl Default for SurfaceAttributes { impl Default for SurfaceAttributes {
fn default() -> SurfaceAttributes { fn default() -> SurfaceAttributes {
SurfaceAttributes { SurfaceAttributes {
@ -259,6 +276,7 @@ impl RegionAttributes {
/// access data associated with the [`wl_surface`](wayland_server::protocol::wl_surface) /// access data associated with the [`wl_surface`](wayland_server::protocol::wl_surface)
/// and [`wl_region`](wayland_server::protocol::wl_region) managed /// and [`wl_region`](wayland_server::protocol::wl_region) managed
/// by the `CompositorGlobal` that provided it. /// by the `CompositorGlobal` that provided it.
#[derive(Debug)]
pub struct CompositorToken<R> { pub struct CompositorToken<R> {
_role: ::std::marker::PhantomData<*mut R>, _role: ::std::marker::PhantomData<*mut R>,
} }
@ -516,6 +534,7 @@ where
/// The global provided by smithay cannot process these events for you, so /// The global provided by smithay cannot process these events for you, so
/// they are forwarded directly via your provided implementation, and are /// they are forwarded directly via your provided implementation, and are
/// described by this global. /// described by this global.
#[derive(Debug)]
pub enum SurfaceEvent { pub enum SurfaceEvent {
/// The double-buffered state has been validated by the client /// The double-buffered state has been validated by the client
/// ///

View File

@ -28,6 +28,7 @@ pub enum Location {
} }
/// Possible actions to do after handling a node diring tree traversal /// Possible actions to do after handling a node diring tree traversal
#[derive(Debug)]
pub enum TraversalAction<T> { pub enum TraversalAction<T> {
/// Traverse its children as well, providing them the data T /// Traverse its children as well, providing them the data T
DoChildren(T), DoChildren(T),

View File

@ -78,6 +78,7 @@ pub use self::data_source::{with_source_metadata, SourceMetadata};
pub use self::server_dnd_grab::ServerDndEvent; pub use self::server_dnd_grab::ServerDndEvent;
/// Events that are generated by interactions of the clients with the data device /// Events that are generated by interactions of the clients with the data device
#[derive(Debug)]
pub enum DataDeviceEvent { pub enum DataDeviceEvent {
/// A client has set the selection /// A client has set the selection
NewSelection(Option<wl_data_source::WlDataSource>), NewSelection(Option<wl_data_source::WlDataSource>),
@ -108,7 +109,7 @@ pub enum DataDeviceEvent {
} }
/// The role applied to surfaces used as DnD icons /// The role applied to surfaces used as DnD icons
#[derive(Default)] #[derive(Debug, Default)]
pub struct DnDIconRole; pub struct DnDIconRole;
enum Selection { enum Selection {

View File

@ -11,6 +11,7 @@ use crate::wayland::Serial;
use super::{DataDeviceData, SeatData}; use super::{DataDeviceData, SeatData};
/// Event generated by the interactions of clients with a server initiated drag'n'drop /// Event generated by the interactions of clients with a server initiated drag'n'drop
#[derive(Debug)]
pub enum ServerDndEvent { pub enum ServerDndEvent {
/// The client chose an action /// The client chose an action
Action(DndAction), Action(DndAction),

View File

@ -76,6 +76,7 @@ use wayland_protocols::unstable::linux_dmabuf::v1::server::{
use wayland_server::{protocol::wl_buffer, Display, Filter, Global, Main}; use wayland_server::{protocol::wl_buffer, Display, Filter, Global, Main};
/// Representation of a Dmabuf format, as advertized to the client /// Representation of a Dmabuf format, as advertized to the client
#[derive(Debug)]
pub struct Format { pub struct Format {
/// The format identifier. /// The format identifier.
pub format: ::drm::buffer::format::PixelFormat, pub format: ::drm::buffer::format::PixelFormat,
@ -89,6 +90,7 @@ pub struct Format {
} }
/// A plane send by the client /// A plane send by the client
#[derive(Debug)]
pub struct Plane { pub struct Plane {
/// The file descriptor /// The file descriptor
pub fd: RawFd, pub fd: RawFd,
@ -115,6 +117,7 @@ bitflags! {
} }
/// The complete information provided by the client to create a dmabuf buffer /// The complete information provided by the client to create a dmabuf buffer
#[derive(Debug)]
pub struct BufferInfo { pub struct BufferInfo {
/// The submitted planes /// The submitted planes
pub planes: Vec<Plane>, pub planes: Vec<Plane>,

View File

@ -86,6 +86,7 @@ use wayland_server::{protocol::wl_surface::WlSurface, Display, Filter, Global, M
use crate::wayland::compositor::{CompositorToken, SurfaceAttributes}; use crate::wayland::compositor::{CompositorToken, SurfaceAttributes};
/// An object to signal end of use of a buffer /// An object to signal end of use of a buffer
#[derive(Debug)]
pub struct ExplicitBufferRelease { pub struct ExplicitBufferRelease {
release: ZwpLinuxBufferReleaseV1, release: ZwpLinuxBufferReleaseV1,
} }
@ -111,6 +112,7 @@ impl ExplicitBufferRelease {
/// The client is not required to fill both. `acquire` being `None` means that you don't need to wait /// The client is not required to fill both. `acquire` being `None` means that you don't need to wait
/// before acessing the buffer, `release` being `None` means that the client does not require additionnal /// before acessing the buffer, `release` being `None` means that the client does not require additionnal
/// signaling that you are finished (you still need to send `wl_buffer.release`). /// signaling that you are finished (you still need to send `wl_buffer.release`).
#[derive(Debug)]
pub struct ExplicitSyncState { pub struct ExplicitSyncState {
/// An acquire `dma_fence` object, that you should wait on before accessing the contents of the /// An acquire `dma_fence` object, that you should wait on before accessing the contents of the
/// buffer associated with the surface. /// buffer associated with the surface.
@ -143,6 +145,7 @@ impl ESUserData {
} }
/// Possible errors you can send to an ill-behaving clients /// Possible errors you can send to an ill-behaving clients
#[derive(Debug)]
pub enum ExplicitSyncError { pub enum ExplicitSyncError {
/// An invalid file descriptor was sent by the client for an acquire fence /// An invalid file descriptor was sent by the client for an acquire fence
InvalidFence, InvalidFence,

View File

@ -80,6 +80,7 @@ impl From<Serial> for u32 {
/// ///
/// The counter will wrap around on overflow, ensuring it can run for as long /// The counter will wrap around on overflow, ensuring it can run for as long
/// as needed. /// as needed.
#[derive(Debug)]
pub struct SerialCounter { pub struct SerialCounter {
// TODO: replace with an AtomicU32 when stabilized // TODO: replace with an AtomicU32 when stabilized
serial: AtomicUsize, serial: AtomicUsize,

View File

@ -65,7 +65,7 @@ use wayland_server::{
/// ///
/// This should only describe the characteristics of the video driver, /// This should only describe the characteristics of the video driver,
/// not taking into account any global scaling. /// not taking into account any global scaling.
#[derive(Copy, Clone, PartialEq)] #[derive(Debug, Copy, Clone, PartialEq)]
pub struct Mode { pub struct Mode {
/// The width in pixels /// The width in pixels
pub width: i32, pub width: i32,
@ -78,6 +78,7 @@ pub struct Mode {
} }
/// The physical properties of an output /// The physical properties of an output
#[derive(Debug)]
pub struct PhysicalProperties { pub struct PhysicalProperties {
/// The width in millimeters /// The width in millimeters
pub width: i32, pub width: i32,
@ -91,6 +92,7 @@ pub struct PhysicalProperties {
pub model: String, pub model: String,
} }
#[derive(Debug)]
struct Inner { struct Inner {
name: String, name: String,
log: ::slog::Logger, log: ::slog::Logger,
@ -155,6 +157,7 @@ impl Inner {
/// ///
/// This handle is stored in the event loop, and allows you to notify clients /// This handle is stored in the event loop, and allows you to notify clients
/// about any change in the properties of this output. /// about any change in the properties of this output.
#[derive(Debug)]
pub struct Output { pub struct Output {
inner: Arc<Mutex<Inner>>, inner: Arc<Mutex<Inner>>,
} }

View File

@ -3,6 +3,7 @@ use crate::wayland::Serial;
use std::{ use std::{
cell::RefCell, cell::RefCell,
default::Default, default::Default,
fmt,
io::{Error as IoError, Write}, io::{Error as IoError, Write},
ops::Deref as _, ops::Deref as _,
os::unix::io::AsRawFd, os::unix::io::AsRawFd,
@ -119,6 +120,22 @@ struct KbdInternal {
focus_hook: Box<dyn FnMut(Option<&WlSurface>)>, focus_hook: Box<dyn FnMut(Option<&WlSurface>)>,
} }
impl fmt::Debug for KbdInternal {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("KbdInternal")
.field("known_kbds", &self.known_kbds)
.field("focus", &self.focus)
.field("pressed_keys", &self.pressed_keys)
.field("mods_state", &self.mods_state)
.field("keymap", &self.keymap.get_raw_ptr())
.field("state", &self.state.get_raw_ptr())
.field("repeat_rate", &self.repeat_rate)
.field("repeat_delay", &self.repeat_delay)
.field("focus_hook", &"...")
.finish()
}
}
// This is OK because all parts of `xkb` will remain on the // This is OK because all parts of `xkb` will remain on the
// same thread // same thread
unsafe impl Send for KbdInternal {} unsafe impl Send for KbdInternal {}
@ -267,6 +284,7 @@ where
}) })
} }
#[derive(Debug)]
struct KbdRc { struct KbdRc {
internal: RefCell<KbdInternal>, internal: RefCell<KbdInternal>,
keymap: String, keymap: String,
@ -284,7 +302,7 @@ struct KbdRc {
/// - process key inputs from the input backend, allowing them to be caught at the compositor-level /// - process key inputs from the input backend, allowing them to be caught at the compositor-level
/// or forwarded to the client. See the documentation of the [`KeyboardHandle::input`] method for /// or forwarded to the client. See the documentation of the [`KeyboardHandle::input`] method for
/// details. /// details.
#[derive(Clone)] #[derive(Debug, Clone)]
pub struct KeyboardHandle { pub struct KeyboardHandle {
arc: Rc<KbdRc>, arc: Rc<KbdRc>,
} }

View File

@ -40,7 +40,7 @@
//! These methods return handles that can be cloned and sent across thread, so you can keep one around //! These methods return handles that can be cloned and sent across thread, so you can keep one around
//! in your event-handling code to forward inputs to your clients. //! in your event-handling code to forward inputs to your clients.
use std::{cell::RefCell, ops::Deref as _, rc::Rc}; use std::{cell::RefCell, fmt, ops::Deref as _, rc::Rc};
mod keyboard; mod keyboard;
mod pointer; mod pointer;
@ -60,6 +60,7 @@ use wayland_server::{
Display, Filter, Global, Main, UserDataMap, Display, Filter, Global, Main, UserDataMap,
}; };
#[derive(Debug)]
struct Inner { struct Inner {
pointer: Option<PointerHandle>, pointer: Option<PointerHandle>,
keyboard: Option<KeyboardHandle>, keyboard: Option<KeyboardHandle>,
@ -73,6 +74,17 @@ pub(crate) struct SeatRc {
name: String, name: String,
} }
impl fmt::Debug for SeatRc {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("SeatRc")
.field("inner", &self.inner)
.field("user_data", &"...")
.field("log", &self.log)
.field("name", &self.name)
.finish()
}
}
impl Inner { impl Inner {
fn compute_caps(&self) -> wl_seat::Capability { fn compute_caps(&self) -> wl_seat::Capability {
let mut caps = wl_seat::Capability::empty(); let mut caps = wl_seat::Capability::empty();
@ -103,7 +115,7 @@ impl Inner {
/// This is an handle to the inner logic, it can be cloned. /// This is an handle to the inner logic, it can be cloned.
/// ///
/// See module-level documentation for details of use. /// See module-level documentation for details of use.
#[derive(Clone)] #[derive(Debug, Clone)]
pub struct Seat { pub struct Seat {
pub(crate) arc: Rc<SeatRc>, pub(crate) arc: Rc<SeatRc>,
} }

View File

@ -1,4 +1,4 @@
use std::{cell::RefCell, ops::Deref as _, rc::Rc}; use std::{cell::RefCell, fmt, ops::Deref as _, rc::Rc};
use wayland_server::{ use wayland_server::{
protocol::{ protocol::{
@ -12,14 +12,14 @@ use crate::wayland::compositor::{roles::Role, CompositorToken};
use crate::wayland::Serial; use crate::wayland::Serial;
/// The role representing a surface set as the pointer cursor /// The role representing a surface set as the pointer cursor
#[derive(Default, Copy, Clone)] #[derive(Debug, Default, Copy, Clone)]
pub struct CursorImageRole { pub struct CursorImageRole {
/// Location of the hotspot of the pointer in the surface /// Location of the hotspot of the pointer in the surface
pub hotspot: (i32, i32), pub hotspot: (i32, i32),
} }
/// Possible status of a cursor as requested by clients /// Possible status of a cursor as requested by clients
#[derive(Clone, PartialEq)] #[derive(Debug, Clone, PartialEq)]
pub enum CursorImageStatus { pub enum CursorImageStatus {
/// The cursor should be hidden /// The cursor should be hidden
Hidden, Hidden,
@ -35,6 +35,16 @@ enum GrabStatus {
Borrowed, Borrowed,
} }
impl fmt::Debug for GrabStatus {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
GrabStatus::None => f.debug_tuple("GrabStatus::None").finish(),
GrabStatus::Active(serial, _) => f.debug_tuple("GrabStatus::Active").field(&serial).finish(),
GrabStatus::Borrowed => f.debug_tuple("GrabStatus::Borrowed").finish(),
}
}
}
struct PointerInternal { struct PointerInternal {
known_pointers: Vec<WlPointer>, known_pointers: Vec<WlPointer>,
focus: Option<(WlSurface, (f64, f64))>, focus: Option<(WlSurface, (f64, f64))>,
@ -45,6 +55,20 @@ struct PointerInternal {
image_callback: Box<dyn FnMut(CursorImageStatus)>, image_callback: Box<dyn FnMut(CursorImageStatus)>,
} }
impl fmt::Debug for PointerInternal {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Point")
.field("known_pointers", &self.known_pointers)
.field("focus", &self.focus)
.field("pending_focus", &self.pending_focus)
.field("location", &self.location)
.field("grab", &self.grab)
.field("pressed_buttons", &self.pressed_buttons)
.field("image_callback", &"...")
.finish()
}
}
impl PointerInternal { impl PointerInternal {
fn new<F, R>(token: CompositorToken<R>, mut cb: F) -> PointerInternal fn new<F, R>(token: CompositorToken<R>, mut cb: F) -> PointerInternal
where where
@ -125,7 +149,7 @@ impl PointerInternal {
/// ///
/// When sending events using this handle, they will be intercepted by a pointer /// When sending events using this handle, they will be intercepted by a pointer
/// grab if any is active. See the [`PointerGrab`] trait for details. /// grab if any is active. See the [`PointerGrab`] trait for details.
#[derive(Clone)] #[derive(Debug, Clone)]
pub struct PointerHandle { pub struct PointerHandle {
inner: Rc<RefCell<PointerInternal>>, inner: Rc<RefCell<PointerInternal>>,
} }
@ -233,7 +257,7 @@ impl PointerHandle {
} }
/// Data about the event that started the grab. /// Data about the event that started the grab.
#[derive(Clone)] #[derive(Debug, Clone)]
pub struct GrabStartData { pub struct GrabStartData {
/// The focused surface and its location, if any, at the start of the grab. /// The focused surface and its location, if any, at the start of the grab.
/// ///
@ -287,6 +311,7 @@ pub trait PointerGrab {
/// This inner handle is accessed from inside a pointer grab logic, and directly /// This inner handle is accessed from inside a pointer grab logic, and directly
/// sends event to the client /// sends event to the client
#[derive(Debug)]
pub struct PointerInnerHandle<'a> { pub struct PointerInnerHandle<'a> {
inner: &'a mut PointerInternal, inner: &'a mut PointerInternal,
} }

View File

@ -77,6 +77,7 @@ use wayland_server::{
mod wl_handlers; mod wl_handlers;
/// Metadata associated with the `wl_surface` role /// Metadata associated with the `wl_surface` role
#[derive(Debug)]
pub struct ShellSurfaceRole { pub struct ShellSurfaceRole {
/// Title of the surface /// Title of the surface
pub title: String, pub title: String,
@ -86,6 +87,7 @@ pub struct ShellSurfaceRole {
} }
/// A handle to a shell surface /// A handle to a shell surface
#[derive(Debug)]
pub struct ShellSurface<R> { pub struct ShellSurface<R> {
wl_surface: wl_surface::WlSurface, wl_surface: wl_surface::WlSurface,
shell_surface: wl_shell_surface::WlShellSurface, shell_surface: wl_shell_surface::WlShellSurface,
@ -169,6 +171,7 @@ where
} }
/// Possible kinds of shell surface of the `wl_shell` protocol /// Possible kinds of shell surface of the `wl_shell` protocol
#[derive(Debug)]
pub enum ShellSurfaceKind { pub enum ShellSurfaceKind {
/// Toplevel, a regular window displayed somewhere in the compositor space /// Toplevel, a regular window displayed somewhere in the compositor space
Toplevel, Toplevel,
@ -222,6 +225,7 @@ pub enum ShellSurfaceKind {
} }
/// A request triggered by a `wl_shell_surface` /// A request triggered by a `wl_shell_surface`
#[derive(Debug)]
pub enum ShellRequest<R> { pub enum ShellRequest<R> {
/// A new shell surface was created /// A new shell surface was created
/// ///
@ -275,6 +279,7 @@ pub enum ShellRequest<R> {
/// ///
/// This state allows you to retrieve a list of surfaces /// This state allows you to retrieve a list of surfaces
/// currently known to the shell global. /// currently known to the shell global.
#[derive(Debug)]
pub struct ShellState<R> { pub struct ShellState<R> {
known_surfaces: Vec<ShellSurface<R>>, known_surfaces: Vec<ShellSurface<R>>,
} }

View File

@ -109,6 +109,7 @@ mod xdg_handlers;
mod zxdgv6_handlers; mod zxdgv6_handlers;
/// Metadata associated with the `xdg_surface` role /// Metadata associated with the `xdg_surface` role
#[derive(Debug)]
pub struct XdgSurfaceRole { pub struct XdgSurfaceRole {
/// Pending state as requested by the client /// Pending state as requested by the client
/// ///
@ -177,6 +178,7 @@ impl PositionerState {
} }
/// Contents of the pending state of a shell surface, depending on its role /// Contents of the pending state of a shell surface, depending on its role
#[derive(Debug)]
pub enum XdgSurfacePendingState { pub enum XdgSurfacePendingState {
/// This a regular, toplevel surface /// This a regular, toplevel surface
/// ///
@ -196,6 +198,7 @@ pub enum XdgSurfacePendingState {
} }
/// State of a regular toplevel surface /// State of a regular toplevel surface
#[derive(Debug)]
pub struct ToplevelState { pub struct ToplevelState {
/// Parent of this surface /// Parent of this surface
/// ///
@ -233,6 +236,7 @@ impl Clone for ToplevelState {
} }
/// The pending state of a popup surface /// The pending state of a popup surface
#[derive(Debug)]
pub struct PopupState { pub struct PopupState {
/// Parent of this popup surface /// Parent of this popup surface
pub parent: Option<wl_surface::WlSurface>, pub parent: Option<wl_surface::WlSurface>,
@ -326,6 +330,7 @@ where
/// ///
/// This state allows you to retrieve a list of surfaces /// This state allows you to retrieve a list of surfaces
/// currently known to the shell global. /// currently known to the shell global.
#[derive(Debug)]
pub struct ShellState<R> { pub struct ShellState<R> {
known_toplevels: Vec<ToplevelSurface<R>>, known_toplevels: Vec<ToplevelSurface<R>>,
known_popups: Vec<PopupSurface<R>>, known_popups: Vec<PopupSurface<R>>,
@ -350,6 +355,7 @@ where
* User interaction * User interaction
*/ */
#[derive(Debug)]
enum ShellClientKind { enum ShellClientKind {
Xdg(xdg_wm_base::XdgWmBase), Xdg(xdg_wm_base::XdgWmBase),
ZxdgV6(zxdg_shell_v6::ZxdgShellV6), ZxdgV6(zxdg_shell_v6::ZxdgShellV6),
@ -377,6 +383,7 @@ fn make_shell_client_data() -> ShellClientData {
/// ///
/// You can use this handle to access a storage for any /// You can use this handle to access a storage for any
/// client-specific data you wish to associate with it. /// client-specific data you wish to associate with it.
#[derive(Debug)]
pub struct ShellClient<R> { pub struct ShellClient<R> {
kind: ShellClientKind, kind: ShellClientKind,
_token: CompositorToken<R>, _token: CompositorToken<R>,
@ -481,13 +488,14 @@ where
} }
} }
#[derive(Clone)] #[derive(Debug, Clone)]
pub(crate) enum ToplevelKind { pub(crate) enum ToplevelKind {
Xdg(xdg_toplevel::XdgToplevel), Xdg(xdg_toplevel::XdgToplevel),
ZxdgV6(zxdg_toplevel_v6::ZxdgToplevelV6), ZxdgV6(zxdg_toplevel_v6::ZxdgToplevelV6),
} }
/// A handle to a toplevel surface /// A handle to a toplevel surface
#[derive(Debug)]
pub struct ToplevelSurface<R> { pub struct ToplevelSurface<R> {
wl_surface: wl_surface::WlSurface, wl_surface: wl_surface::WlSurface,
shell_surface: ToplevelKind, shell_surface: ToplevelKind,
@ -650,6 +658,7 @@ where
} }
} }
#[derive(Debug)]
pub(crate) enum PopupKind { pub(crate) enum PopupKind {
Xdg(xdg_popup::XdgPopup), Xdg(xdg_popup::XdgPopup),
ZxdgV6(zxdg_popup_v6::ZxdgPopupV6), ZxdgV6(zxdg_popup_v6::ZxdgPopupV6),
@ -659,6 +668,7 @@ pub(crate) enum PopupKind {
/// ///
/// This is an unified abstraction over the popup surfaces /// This is an unified abstraction over the popup surfaces
/// of both `wl_shell` and `xdg_shell`. /// of both `wl_shell` and `xdg_shell`.
#[derive(Debug)]
pub struct PopupSurface<R> { pub struct PopupSurface<R> {
wl_surface: wl_surface::WlSurface, wl_surface: wl_surface::WlSurface,
shell_surface: PopupKind, shell_surface: PopupKind,
@ -818,6 +828,7 @@ where
} }
/// A configure message for toplevel surfaces /// A configure message for toplevel surfaces
#[derive(Debug)]
pub struct ToplevelConfigure { pub struct ToplevelConfigure {
/// A suggestion for a new size for the surface /// A suggestion for a new size for the surface
pub size: Option<(i32, i32)>, pub size: Option<(i32, i32)>,
@ -835,6 +846,7 @@ pub struct ToplevelConfigure {
} }
/// A configure message for popup surface /// A configure message for popup surface
#[derive(Debug)]
pub struct PopupConfigure { pub struct PopupConfigure {
/// The position chosen for this popup relative to /// The position chosen for this popup relative to
/// its parent /// its parent
@ -855,6 +867,7 @@ pub struct PopupConfigure {
/// for you directly. /// for you directly.
/// ///
/// Depending on what you want to do, you might ignore some of them /// Depending on what you want to do, you might ignore some of them
#[derive(Debug)]
pub enum XdgRequest<R> { pub enum XdgRequest<R> {
/// A new shell client was instantiated /// A new shell client was instantiated
NewClient { NewClient {

View File

@ -82,7 +82,7 @@ use wayland_server::{
mod pool; mod pool;
#[derive(Clone)] #[derive(Debug, Clone)]
/// Internal data storage of `ShmGlobal` /// Internal data storage of `ShmGlobal`
/// ///
/// This type is only visible as type parameter of /// This type is only visible as type parameter of