XwmHandler

Trait XwmHandler 

Source
pub trait XwmHandler {
Show 26 methods // Required methods fn xwm_state(&mut self, xwm: XwmId) -> &mut X11Wm; fn new_window(&mut self, xwm: XwmId, window: X11Surface); fn new_override_redirect_window(&mut self, xwm: XwmId, window: X11Surface); fn map_window_request(&mut self, xwm: XwmId, window: X11Surface); fn mapped_override_redirect_window( &mut self, xwm: XwmId, window: X11Surface, ); fn unmapped_window(&mut self, xwm: XwmId, window: X11Surface); fn destroyed_window(&mut self, xwm: XwmId, window: X11Surface); fn configure_request( &mut self, xwm: XwmId, window: X11Surface, x: Option<i32>, y: Option<i32>, w: Option<u32>, h: Option<u32>, reorder: Option<Reorder>, ); fn configure_notify( &mut self, xwm: XwmId, window: X11Surface, geometry: Rectangle<i32, Logical>, above: Option<X11Window>, ); fn resize_request( &mut self, xwm: XwmId, window: X11Surface, button: u32, resize_edge: ResizeEdge, ); fn move_request(&mut self, xwm: XwmId, window: X11Surface, button: u32); // Provided methods fn map_window_notify(&mut self, xwm: XwmId, window: X11Surface) { ... } fn property_notify( &mut self, xwm: XwmId, window: X11Surface, property: WmWindowProperty, ) { ... } fn maximize_request(&mut self, xwm: XwmId, window: X11Surface) { ... } fn unmaximize_request(&mut self, xwm: XwmId, window: X11Surface) { ... } fn fullscreen_request(&mut self, xwm: XwmId, window: X11Surface) { ... } fn unfullscreen_request(&mut self, xwm: XwmId, window: X11Surface) { ... } fn minimize_request(&mut self, xwm: XwmId, window: X11Surface) { ... } fn unminimize_request(&mut self, xwm: XwmId, window: X11Surface) { ... } fn active_window_request( &mut self, xwm: XwmId, window: X11Surface, timestamp: u32, currently_active_window: Option<X11Surface>, ) { ... } fn allow_selection_access( &mut self, xwm: XwmId, selection: SelectionTarget, ) -> bool { ... } fn send_selection( &mut self, xwm: XwmId, selection: SelectionTarget, mime_type: String, fd: OwnedFd, ) { ... } fn new_selection( &mut self, xwm: XwmId, selection: SelectionTarget, mime_types: Vec<String>, ) { ... } fn cleared_selection(&mut self, xwm: XwmId, selection: SelectionTarget) { ... } fn randr_primary_output_change( &mut self, xwm: XwmId, output_name: Option<String>, ) { ... } fn disconnected(&mut self, _xwm: XwmId) { ... }
}
Available on crate feature xwayland only.
Expand description

Handler trait for X11Wm interactions

Required Methods§

Source

fn xwm_state(&mut self, xwm: XwmId) -> &mut X11Wm

X11Wm getter for a given ID.

Source

fn new_window(&mut self, xwm: XwmId, window: X11Surface)

A new X11 window was created.

New windows are not mapped yet, but various information is already accessible. In general new windows will either stay in this state, if they serve secondary purposes or request to be mapped shortly afterwards.

Source

fn new_override_redirect_window(&mut self, xwm: XwmId, window: X11Surface)

A new X11 window with the override redirect flag.

New override_redirect windows are not mapped yet, but can become any time. Window manager are not supposed to manage these windows and thus cannot intercept most operations (including mapping).

It is best to replicate their state in smithay as faithfully as possible (e.g. positioning) and don’t touch their state in any way.

Source

fn map_window_request(&mut self, xwm: XwmId, window: X11Surface)

Window requests to be mapped.

To grant the wish you have to call X11Surface::set_mapped(true) for the window to become visible.

Source

fn mapped_override_redirect_window(&mut self, xwm: XwmId, window: X11Surface)

Override redirect window was mapped.

This is a notification. The XWM cannot prohibit override redirect windows to become mapped.

Source

fn unmapped_window(&mut self, xwm: XwmId, window: X11Surface)

Window was unmapped.

Source

fn destroyed_window(&mut self, xwm: XwmId, window: X11Surface)

Window was destroyed

Source

fn configure_request( &mut self, xwm: XwmId, window: X11Surface, x: Option<i32>, y: Option<i32>, w: Option<u32>, h: Option<u32>, reorder: Option<Reorder>, )

Window asks to be positioned or sized differently.

Requests can be granted by calling X11Surface::configure with updated values.

Source

fn configure_notify( &mut self, xwm: XwmId, window: X11Surface, geometry: Rectangle<i32, Logical>, above: Option<X11Window>, )

Window was reconfigured.

This call will be done as a notification for both normal and override-redirect windows. Override-redirect windows can modify their size, position and stack order at any time and the compositor should properly reflect these new values to avoid bugs.

Source

fn resize_request( &mut self, xwm: XwmId, window: X11Surface, button: u32, resize_edge: ResizeEdge, )

Window requests to be resized.

The window will be holding a grab on the mouse button provided and requests to be resized on the edges passed.

Source

fn move_request(&mut self, xwm: XwmId, window: X11Surface, button: u32)

Window requests to be moved.

The window will be holding a grab on the mouse button provided.

Provided Methods§

Source

fn map_window_notify(&mut self, xwm: XwmId, window: X11Surface)

Notification a window was mapped sucessfully

Source

fn property_notify( &mut self, xwm: XwmId, window: X11Surface, property: WmWindowProperty, )

A window property has changed.

Source

fn maximize_request(&mut self, xwm: XwmId, window: X11Surface)

Window requests to be maximized.

Source

fn unmaximize_request(&mut self, xwm: XwmId, window: X11Surface)

Window requests to be unmaximized.

Source

fn fullscreen_request(&mut self, xwm: XwmId, window: X11Surface)

Window requests to be fullscreened.

Source

fn unfullscreen_request(&mut self, xwm: XwmId, window: X11Surface)

Window requests to be unfullscreened.

Source

fn minimize_request(&mut self, xwm: XwmId, window: X11Surface)

Window requests to be minimized.

Source

fn unminimize_request(&mut self, xwm: XwmId, window: X11Surface)

Window requests to be unminimized.

Source

fn active_window_request( &mut self, xwm: XwmId, window: X11Surface, timestamp: u32, currently_active_window: Option<X11Surface>, )

Window requests to be set as active window.

A client may include a currently_active_window in the request to indicate this is a focus change from another window by the same client.

Source

fn allow_selection_access( &mut self, xwm: XwmId, selection: SelectionTarget, ) -> bool

Window requests access to the given selection.

Source

fn send_selection( &mut self, xwm: XwmId, selection: SelectionTarget, mime_type: String, fd: OwnedFd, )

The given selection is being read by an X client and needs to be written to the provided file descriptor

Source

fn new_selection( &mut self, xwm: XwmId, selection: SelectionTarget, mime_types: Vec<String>, )

A new selection was set by an X client with provided mime_types

Source

fn cleared_selection(&mut self, xwm: XwmId, selection: SelectionTarget)

A proviously set selection of an X client got cleared

Source

fn randr_primary_output_change( &mut self, xwm: XwmId, output_name: Option<String>, )

The primary output of the randr protocol state was updated

Source

fn disconnected(&mut self, _xwm: XwmId)

WM has lost connection to X server

Implementors§