Trait smithay_client_toolkit::shell::xdg::window::WindowHandler

source ·
pub trait WindowHandler: Sized {
    // Required methods
    fn request_close(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        window: &Window,
    );
    fn configure(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        window: &Window,
        configure: WindowConfigure,
        serial: u32,
    );
}
Expand description

Handler for toplevel operations on a Window.

Required Methods§

source

fn request_close( &mut self, conn: &Connection, qh: &QueueHandle<Self>, window: &Window, )

Request to close a window.

This request does not destroy the window. You must drop all Window handles to destroy the window. This request may be sent either by the compositor or by some other mechanism (such as client side decorations).

source

fn configure( &mut self, conn: &Connection, qh: &QueueHandle<Self>, window: &Window, configure: WindowConfigure, serial: u32, )

Apply a suggested surface change.

When this function is called, the compositor is requesting the window’s size or state to change.

Internally this function is called when the underlying xdg_surface is configured. Any extension protocols that interface with xdg-shell are able to be notified that the surface’s configure sequence is complete by using this function.

§Double buffering

Configure events in Wayland are considered to be double buffered and the state of the window does not change until committed.

Object Safety§

This trait is not object safe.

Implementors§