<NME> mod.rs
<BEF> //! Handler utilities for the various shell protocols
//!
//! Wayland, via its different protocol extensions, supports different kind of
//! shells. Here a shell represent the logic associated to displaying windows and
//! arranging them on the screen.
//!
//! The shell protocols thus define what kind of interactions a client can have with
//! the compositor to properly display its contents on the screen.
//!
//! Smithay currently provides three of them:
//!
//! - The [`xdg`](xdg/index.html) module provides handlers for the `xdg_shell` protocol, which is
//!   the current standard for desktop apps
//! - The [`wlr_layer`](wlr_layer/index.html) module provides handlers for the `wlr_layer_shell`
//!   protocol, which is for windows rendering above/below normal XDG windows
//! - The [`kde`](kde/index.html) module provides handlers for KDE-specific protocols

use crate::{utils::Serial, wayland::compositor};
use thiserror::Error;
use wayland_server::protocol::wl_surface::WlSurface;

pub mod kde;
pub mod wlr_layer;
pub mod xdg;

/// Represents the possible errors returned from
/// a surface ping
#[derive(Debug, Error)]
pub enum PingError {
    /// The operation failed because the underlying surface has been destroyed
    #[error("the ping failed cause the underlying surface has been destroyed")]
    DeadSurface,
//! use smithay::wayland::compositor::CompositorToken;
//! use smithay::wayland::shell::{shell_init, ShellSurfaceRole, ShellSurfaceUserImplementation};
//! use wayland_server::protocol::wl_shell::WlShell;
//! use wayland_protocols::unstable::xdg_shell::server::zxdg_shell_v6::ZxdgShellV6;
//! use wayland_server::{EventLoop, EventLoopHandle};
//! # use wayland_server::protocol::{wl_seat, wl_output};
//! # use wayland_protocols::unstable::xdg_shell::server::zxdg_toplevel_v6;
//! # #[derive(Default)] struct MySurfaceData;
//!
//! // define the roles type. You need to integrate the ShellSurface role:
    // xdg_toplevel is toplevel like, so verify if the role matches.
    let role = compositor::get_role(surface);

    matches!(role, Some(xdg::XDG_TOPLEVEL_ROLE))
}
use utils::Rectangle;
use wayland::compositor::CompositorToken;
use wayland::compositor::roles::Role;
use wayland_protocols::unstable::xdg_shell::server::{zxdg_popup_v6, zxdg_positioner_v6 as xdg_positioner,
                                                     zxdg_shell_v6, zxdg_surface_v6, zxdg_toplevel_v6};
use wayland_server::{EventLoop, EventLoopHandle, EventResult, Global, Liveness, Resource, StateToken};
use wayland_server::protocol::{wl_output, wl_seat, wl_shell, wl_shell_surface, wl_surface};


<MSG> Upgrade wayland-server to 0.12

<DFF> @@ -33,10 +33,10 @@
 //! use smithay::wayland::compositor::CompositorToken;
 //! use smithay::wayland::shell::{shell_init, ShellSurfaceRole, ShellSurfaceUserImplementation};
 //! use wayland_server::protocol::wl_shell::WlShell;
-//! use wayland_protocols::unstable::xdg_shell::server::zxdg_shell_v6::ZxdgShellV6;
+//! use wayland_protocols::unstable::xdg_shell::v6::server::zxdg_shell_v6::ZxdgShellV6;
 //! use wayland_server::{EventLoop, EventLoopHandle};
 //! # use wayland_server::protocol::{wl_seat, wl_output};
-//! # use wayland_protocols::unstable::xdg_shell::server::zxdg_toplevel_v6;
+//! # use wayland_protocols::unstable::xdg_shell::v6::server::zxdg_toplevel_v6;
 //! # #[derive(Default)] struct MySurfaceData;
 //!
 //! // define the roles type. You need to integrate the ShellSurface role:
@@ -110,8 +110,9 @@ use std::rc::Rc;
 use utils::Rectangle;
 use wayland::compositor::CompositorToken;
 use wayland::compositor::roles::Role;
-use wayland_protocols::unstable::xdg_shell::server::{zxdg_popup_v6, zxdg_positioner_v6 as xdg_positioner,
-                                                     zxdg_shell_v6, zxdg_surface_v6, zxdg_toplevel_v6};
+use wayland_protocols::unstable::xdg_shell::v6::server::{zxdg_popup_v6,
+                                                         zxdg_positioner_v6 as xdg_positioner,
+                                                         zxdg_shell_v6, zxdg_surface_v6, zxdg_toplevel_v6};
 use wayland_server::{EventLoop, EventLoopHandle, EventResult, Global, Liveness, Resource, StateToken};
 use wayland_server::protocol::{wl_output, wl_seat, wl_shell, wl_shell_surface, wl_surface};
 

Upgrade wayland-server to 0.12