Skip to main content

AppState

Struct AppState 

Source
pub struct AppState {
Show 63 fields pub compositor_state: CompositorState, pub fractional_scale_state: FractionalScaleManagerState, pub viewporter_state: ViewporterState, pub presentation_state: PresentationState, pub shm_state: ShmState, pub single_pixel_buffer: SinglePixelBufferState, pub dmabuf_state: DmabufState, pub dmabuf_global: Option<DmabufGlobal>, pub ext_data_control_state: DataControlState, pub cursor_shape_state: CursorShapeManagerState, pub image_capture_source_state: ImageCaptureSourceState, pub output_capture_source_state: OutputCaptureSourceState, pub image_copy_capture_state: ImageCopyCaptureState, pub copy_sessions: Vec<OutputCopySession>, pub output_state: OutputManagerState, pub seat_state: SeatState<AppState>, pub shell_state: XdgShellState, pub layer_shell_state: WlrLayerShellState, pub space: Space<Window>, pub data_device_state: DataDeviceState, pub data_control_state: DataControlState, pub dh: DisplayHandle, pub seat: Seat<AppState>, pub output_nodes: Vec<OutputNode>, pub pending_windows: Vec<Window>, pub foreign_toplevel_list: ForeignToplevelListState, pub xdg_decoration_state: XdgDecorationState, pub xdg_activation_state: XdgActivationState, pub primary_selection_state: PrimarySelectionState, pub popups: PopupManager, pub gles_renderer: Option<GlesRenderer>, pub pixman_renderer: Option<PixmanRenderer>, pub gbm_device: Option<Device<File>>, pub settings: RustCaptureSettings, pub cursor_callback_set: bool, pub cursor_tx: Sender<CursorJob>, pub clipboard_callback: Option<Py<PyAny>>, pub pending_clipboard_read: Option<String>, pub current_selection_mime: Option<String>, pub last_log_time: Instant, pub start_time: Instant, pub clock: Clock<Monotonic>, pub use_gpu: bool, pub cursor_helper: Cursor, pub keymap_policy: KeymapPolicy, pub host: Option<HostSession>, pub host_layout_pending: HashMap<u32, PendingHostLayout>, pub current_cursor_icon: Option<CursorImageStatus>, pub cursor_surface_pending: bool, pub cursor_buffer: Option<WlBuffer>, pub render_cursor_on_framebuffer: bool, pub pointer_warp_state: PointerWarpManager, pub relative_pointer_state: RelativePointerManagerState, pub pointer_constraints_state: PointerConstraintsState, pub render_node_path: String, pub auto_gpu_selected: bool, pub pending_screenshot: Option<ScreenshotRequest>, pub command_rx: Option<Channel<ThreadCommand>>, pub last_input_at: Option<Instant>, pub frame_idle_long: bool, pub last_idle_service_at: Option<Instant>, pub deliver_reaper: Vec<JoinHandle<()>>, pub encode_reaper: Vec<JoinHandle<Option<GpuEncoder>>>,
}
Expand description

Central context threaded through every Smithay handler; owns the Wayland globals, the GBM/EGL (or pixman) renderer state, and the capture/encode pipeline state.

A single AppState lives for the whole compositor thread and is mutated in place by the calloop event sources (client dispatch, input injection, the capture timer). The frame pipeline is instantiated PER DISPLAY: each OutputNode in output_nodes owns its output, damage tracker, and render targets, and its optional WlCapture owns that display’s encoder set and delivery. The non-obvious WlCapture/OutputNode fields encode the pipeline’s threading and buffer strategy:

  1. Render / encode targets (per display):

    • video_encoder: the zero-copy GPU session only (GLES render + same-GPU dmabuf encode). Its EGL/dmabuf handles are calloop-affine, so this encoder runs inline on the calloop thread; it is None whenever a readback path is active.
    • encode_pool / encode_join: the readback capture||encode split. The calloop renders and reads back into a pooled host buffer and publishes it, while a separate encode thread owns the CPU / cross-GPU / pixman-HW encoders. encode_join returns that thread’s hardware session on shutdown so a restart can reconfigure it in place rather than rebuild it. Both are None while a zero-copy GPU session runs.
    • frame_buffer: scratch render target used only by the pixman memory-throttle path; the normal readback path renders and reads back into the pooled buffers instead.
    • pool_last_render / render_seq: buffer-age bookkeeping for the pixman path, which renders directly into the pooled buffers (an age is “renders since this slot was last the target”). The GLES path renders into one fixed offscreen buffer and never consults these.
    • pool_content_gen / content_gen: staleness bookkeeping for the GLES readback path, which skips the GPU readback on no-damage ticks. content_gen advances whenever a render reports damage; a pooled buffer whose stamp lags it holds pre-damage pixels and must be read back once before publishing, so the encoder’s paint-over / burst / recovery sends never ship stale content.
  2. Delivery (deliver_tx / deliver_join): encoded frames go to a dedicated delivery thread over a capacity-1 rendezvous channel, mirroring the X11 single-slot FramePool (non-dropping, ordered, at most one frame of blocking backpressure), so a slow GIL-holding Python callback can never stall input/control dispatch on the calloop thread.

  3. Keyframes (pending_force_idr): set by an IDR request (client reconnect / decoder reset) and consumed once on the next captured frame to force an immediate keyframe.

  4. Clipboard (pending_clipboard_read): stages the mime chosen in new_selection; the loop drains it only after the dispatch that stores the new client source, so the read targets the new selection rather than the previous one.

  5. GPU selection (auto_gpu_selected): records that automatic (not explicit) selection picked render_node_path, so StartCapture aims the encoder at that same node unless a device was chosen explicitly.

Fields§

§compositor_state: CompositorState§fractional_scale_state: FractionalScaleManagerState§viewporter_state: ViewporterState§presentation_state: PresentationState§shm_state: ShmState§single_pixel_buffer: SinglePixelBufferState§dmabuf_state: DmabufState§dmabuf_global: Option<DmabufGlobal>§ext_data_control_state: DataControlState§cursor_shape_state: CursorShapeManagerState§image_capture_source_state: ImageCaptureSourceState§output_capture_source_state: OutputCaptureSourceState§image_copy_capture_state: ImageCopyCaptureState§copy_sessions: Vec<OutputCopySession>§output_state: OutputManagerState§seat_state: SeatState<AppState>§shell_state: XdgShellState§layer_shell_state: WlrLayerShellState§space: Space<Window>§data_device_state: DataDeviceState§data_control_state: DataControlState§dh: DisplayHandle§seat: Seat<AppState>§output_nodes: Vec<OutputNode>

Every live output with its per-display render/capture state; index 0 is the primary (display id 0), which is never destroyed.

§pending_windows: Vec<Window>§foreign_toplevel_list: ForeignToplevelListState§xdg_decoration_state: XdgDecorationState§xdg_activation_state: XdgActivationState§primary_selection_state: PrimarySelectionState§popups: PopupManager§gles_renderer: Option<GlesRenderer>§pixman_renderer: Option<PixmanRenderer>§gbm_device: Option<Device<File>>§settings: RustCaptureSettings

Mirror of the PRIMARY display’s capture settings (geometry fallbacks, computer-use info); per-display settings live on each capture.

§cursor_callback_set: bool

A cursor callback is registered on the wl-cursor worker (which owns the actual Py object); tracked here so sprite resolution is skipped while nobody listens.

§cursor_tx: Sender<CursorJob>

Cursor delivery jobs to the wl-cursor worker (PNG encode + Python call off-thread).

§clipboard_callback: Option<Py<PyAny>>§pending_clipboard_read: Option<String>§current_selection_mime: Option<String>

Preferred mime of the current CLIENT-owned clipboard selection, recorded even while no callback is registered so SetClipboardCallback can re-stage a read of a copy made in the gap; None when the selection is cleared or compositor-owned.

§last_log_time: Instant§start_time: Instant§clock: Clock<Monotonic>§use_gpu: bool§cursor_helper: Cursor§keymap_policy: KeymapPolicy

Seat keymap owner: base layout plus batched overlay binds. Every seat keymap swap flows through this policy, so keymap identity has exactly one writer.

§host: Option<HostSession>

Host-capture session when pixelflux captures an EXTERNAL compositor: frames arrive by screencopy and input routes to its virtual devices.

§host_layout_pending: HashMap<u32, PendingHostLayout>

Per display, the layout request the host has not answered yet. A capture start submits its mode and carries on at that size; the render tick polls the verdict and re-sizes the capture to the host’s own mode when the host kept it. Emptied with the host session.

§current_cursor_icon: Option<CursorImageStatus>§cursor_surface_pending: bool

A surface-backed cursor set during the dispatch in progress and not delivered yet: clients commit the sprite’s buffer after set_cursor in the same batch, so delivery waits for that commit, or for the end of the dispatch when none comes, rather than shipping the surface’s previous sprite under the new hotspot.

§cursor_buffer: Option<WlBuffer>§render_cursor_on_framebuffer: bool§pointer_warp_state: PointerWarpManager§relative_pointer_state: RelativePointerManagerState§pointer_constraints_state: PointerConstraintsState§render_node_path: String§auto_gpu_selected: bool§pending_screenshot: Option<ScreenshotRequest>

Computer-use screenshot request; served from that output’s next render (the id was validated live when the request was queued).

§command_rx: Option<Channel<ThreadCommand>>

The command channel, drained in place (wakeups arrive on a separate ping channel) so the render tick can apply every queued command BEFORE starting a long render/encode — queued input is never starved behind the tick it arrived during.

§last_input_at: Option<Instant>

When the last input command landed: the no-capture tick speeds up right after input so apps pacing on frame callbacks respond promptly (they are the ones noticing the idle rate while nobody encodes).

§frame_idle_long: bool

Whether the frame timer is armed at the long idle interval: input arriving then must not wait that deadline out, so the wake handler sends the idle frame callbacks itself (frame-paced via last_idle_service_at) instead of waiting for the timer.

§last_idle_service_at: Option<Instant>

When idle frame callbacks were last serviced, bounding the wake handler’s servicing to frame pace under an input storm.

§deliver_reaper: Vec<JoinHandle<()>>

Deliver threads of stopped captures, joined without blocking the event loop: the timer tick reaps the finished ones, and the shutdown Barrier drains the rest so nothing that can attach to Python outlives it.

§encode_reaper: Vec<JoinHandle<Option<GpuEncoder>>>

Encode threads whose teardown-time harvest expired (wedged behind a consumer inside Python); reaped like the deliver threads, with the unclaimed encoder dropped here on the event loop — its usual home.

Implementations§

Source§

impl AppState

Source

pub fn copy_frame_pending_for(&self, output: &Output) -> bool

Trait Implementations§

Source§

impl BufferHandler for AppState

Buffer lifecycle hook: buffer destruction needs no bookkeeping here.

Source§

fn buffer_destroyed(&mut self, _buffer: &WlBuffer)

Called when the client has destroyed the buffer. Read more
Source§

impl CompositorHandler for AppState

Core wl_compositor protocol: per-surface commit handling plus the window map/configure/focus state machine.

Source§

fn commit(&mut self, surface: &WlSurface)

Fold a client’s wl_surface.commit into compositor state and — the reason the window logic lives in this handler — walk a brand-new toplevel through the xdg-shell handshake it must finish before it may be shown.

A window cannot just appear on its first commit: xdg-shell requires the compositor to send an initial configure (telling the client the size and state to draw at) and the client to ack it and commit a buffer matching that size before the surface counts as mapped. Mapping earlier would flash an unconfigured, wrongly-sized window into the captured frame. So a pending toplevel is carried across two commits instead of one, while everything else here is per-commit housekeeping that must run whether or not a map is in flight. On each commit, in order:

  1. Buffer intake: on_commit_buffer_handler ingests the newly attached buffer.
  2. Layer relayout: if the surface is a mapped layer surface, re-arrange the output’s layer map so geometry tracks the new content.
  3. Cursor refresh: if the surface backs the current cursor, re-send its image so a client animating its own cursor surface is reflected downstream.
  4. Foreign-toplevel metadata: push the current title / app-id to the foreign-toplevel handle for taskbar-style clients.
  5. Window on-commit: forward the commit to the matching mapped Window.
  6. Two-phase map of a pending toplevel:
    • First commit — no initial configure sent yet: this commit is the client announcing it wants to be shown, so compute the logical size from the output mode/scale (falling back to the settings resolution), send a fullscreen + activated configure, and re-queue the window to wait for the client’s acked commit — nothing is mapped yet.
    • Acked commit — the client has drawn to that configure: map the element at the origin, refresh its cached bounding box before reading geometry (so the drift check sees current geometry and doesn’t fire a redundant configure), enter the output, and, only if the client’s geometry still drifts more than a pixel from the expected fullscreen size, send one corrective configure. Finally give the new window keyboard focus so input lands on it at once.
Source§

fn compositor_state(&mut self) -> &mut CompositorState

[CompositorState] getter
Source§

fn client_compositor_state<'a>( &self, client: &'a Client, ) -> &'a CompositorClientState

[CompositorClientState] getter Read more
§

fn new_surface(&mut self, surface: &WlSurface)

New surface handler. Read more
§

fn new_subsurface(&mut self, surface: &WlSurface, parent: &WlSurface)

New subsurface handler. Read more
§

fn destroyed(&mut self, _surface: &WlSurface)

The surface was destroyed. Read more
Source§

impl DataControlHandler for AppState

wlr-data-control protocol: exposes the managed state so privileged clients can read and set selections.

Source§

fn data_control_state(&mut self) -> &mut DataControlState

[DataControlState] getter.
Source§

impl DataControlHandler for AppState

ext-data-control: the standardized successor of wlr-data-control. Both globals stay advertised, sharing the same selection state, so older clipboard managers keep working while current ones use the ext protocol.

Source§

fn data_control_state(&mut self) -> &mut ExtDataControlState

[DataControlState] getter.
Source§

impl DataDeviceHandler for AppState

wl_data_device protocol: exposes the managed state for drag-and-drop and clipboard data transfers.

Source§

fn data_device_state(&mut self) -> &mut DataDeviceState

[DataDeviceState] getter
§

fn action_choice( &mut self, available: DndAction, preferred: DndAction, ) -> DndAction

Action chooser for DnD negotiation
Source§

impl Dispatch<ExtForeignToplevelHandleV1, ForeignToplevelHandle> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ExtForeignToplevelHandleV1, request: <ExtForeignToplevelHandleV1 as Resource>::Request, data: &ForeignToplevelHandle, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ExtForeignToplevelHandleV1, data: &ForeignToplevelHandle, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ExtForeignToplevelListV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ExtForeignToplevelListV1, request: <ExtForeignToplevelListV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ExtForeignToplevelListV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ExtImageCaptureSourceV1, ImageCaptureSourceData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ExtImageCaptureSourceV1, request: <ExtImageCaptureSourceV1 as Resource>::Request, data: &ImageCaptureSourceData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ExtImageCaptureSourceV1, data: &ImageCaptureSourceData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ExtImageCopyCaptureManagerV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ExtImageCopyCaptureManagerV1, request: <ExtImageCopyCaptureManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ExtImageCopyCaptureManagerV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ExtOutputImageCaptureSourceManagerV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ExtOutputImageCaptureSourceManagerV1, request: <ExtOutputImageCaptureSourceManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ExtOutputImageCaptureSourceManagerV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlBuffer, Dmabuf> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlBuffer, request: <WlBuffer as Resource>::Request, data: &Dmabuf, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlBuffer, data: &Dmabuf, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlBuffer, ShmBufferUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlBuffer, request: <WlBuffer as Resource>::Request, data: &ShmBufferUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlBuffer, data: &ShmBufferUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlBuffer, SinglePixelBufferUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlBuffer, request: <WlBuffer as Resource>::Request, data: &SinglePixelBufferUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlBuffer, data: &SinglePixelBufferUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlCallback, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlCallback, request: <WlCallback as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlCallback, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlCompositor, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlCompositor, request: <WlCompositor as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlCompositor, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlDataDeviceManager, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlDataDeviceManager, request: <WlDataDeviceManager as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlDataDeviceManager, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlKeyboard, KeyboardUserData<AppState>> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlKeyboard, request: <WlKeyboard as Resource>::Request, data: &KeyboardUserData<AppState>, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlKeyboard, data: &KeyboardUserData<AppState>, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlOutput, OutputUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlOutput, request: <WlOutput as Resource>::Request, data: &OutputUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlOutput, data: &OutputUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlPointer, PointerUserData<AppState>> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlPointer, request: <WlPointer as Resource>::Request, data: &PointerUserData<AppState>, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlPointer, data: &PointerUserData<AppState>, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlRegion, RegionUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlRegion, request: <WlRegion as Resource>::Request, data: &RegionUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlRegion, data: &RegionUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlSeat, SeatUserData<AppState>> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlSeat, request: <WlSeat as Resource>::Request, data: &SeatUserData<AppState>, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlSeat, data: &SeatUserData<AppState>, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlShm, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlShm, request: <WlShm as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed(state: &mut Self, client: ClientId, resource: &WlShm, data: &())

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlShmPool, ShmPoolUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlShmPool, request: <WlShmPool as Resource>::Request, data: &ShmPoolUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlShmPool, data: &ShmPoolUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlSubcompositor, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlSubcompositor, request: <WlSubcompositor as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlSubcompositor, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlSubsurface, SubsurfaceUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlSubsurface, request: <WlSubsurface as Resource>::Request, data: &SubsurfaceUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlSubsurface, data: &SubsurfaceUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlSurface, SurfaceUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlSurface, request: <WlSurface as Resource>::Request, data: &SurfaceUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlSurface, data: &SurfaceUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WlTouch, TouchUserData<AppState>> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WlTouch, request: <WlTouch as Resource>::Request, data: &TouchUserData<AppState>, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WlTouch, data: &TouchUserData<AppState>, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WpCursorShapeManagerV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WpCursorShapeManagerV1, request: <WpCursorShapeManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WpCursorShapeManagerV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WpFractionalScaleManagerV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WpFractionalScaleManagerV1, request: <WpFractionalScaleManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WpFractionalScaleManagerV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WpFractionalScaleV1, Weak<WlSurface>> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WpFractionalScaleV1, request: <WpFractionalScaleV1 as Resource>::Request, data: &Weak<WlSurface>, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WpFractionalScaleV1, data: &Weak<WlSurface>, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WpPointerWarpV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WpPointerWarpV1, request: <WpPointerWarpV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WpPointerWarpV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WpPresentation, u32> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WpPresentation, request: <WpPresentation as Resource>::Request, data: &u32, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WpPresentation, data: &u32, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WpPresentationFeedback, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WpPresentationFeedback, request: <WpPresentationFeedback as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WpPresentationFeedback, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WpSinglePixelBufferManagerV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WpSinglePixelBufferManagerV1, request: <WpSinglePixelBufferManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WpSinglePixelBufferManagerV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WpViewport, ViewportState> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WpViewport, request: <WpViewport as Resource>::Request, data: &ViewportState, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WpViewport, data: &ViewportState, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<WpViewporter, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &WpViewporter, request: <WpViewporter as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &WpViewporter, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<XdgActivationTokenV1, ActivationTokenData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &XdgActivationTokenV1, request: <XdgActivationTokenV1 as Resource>::Request, data: &ActivationTokenData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &XdgActivationTokenV1, data: &ActivationTokenData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<XdgActivationV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &XdgActivationV1, request: <XdgActivationV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &XdgActivationV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<XdgPopup, XdgShellSurfaceUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &XdgPopup, request: <XdgPopup as Resource>::Request, data: &XdgShellSurfaceUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &XdgPopup, data: &XdgShellSurfaceUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<XdgPositioner, XdgPositionerUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &XdgPositioner, request: <XdgPositioner as Resource>::Request, data: &XdgPositionerUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &XdgPositioner, data: &XdgPositionerUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<XdgSurface, XdgSurfaceUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &XdgSurface, request: <XdgSurface as Resource>::Request, data: &XdgSurfaceUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &XdgSurface, data: &XdgSurfaceUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<XdgToplevel, XdgShellSurfaceUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &XdgToplevel, request: <XdgToplevel as Resource>::Request, data: &XdgShellSurfaceUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &XdgToplevel, data: &XdgShellSurfaceUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<XdgWmBase, XdgWmBaseUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &XdgWmBase, request: <XdgWmBase as Resource>::Request, data: &XdgWmBaseUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &XdgWmBase, data: &XdgWmBaseUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwlrLayerShellV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZwlrLayerShellV1, request: <ZwlrLayerShellV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZwlrLayerShellV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwlrLayerSurfaceV1, WlrLayerSurfaceUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZwlrLayerSurfaceV1, request: <ZwlrLayerSurfaceV1 as Resource>::Request, data: &WlrLayerSurfaceUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZwlrLayerSurfaceV1, data: &WlrLayerSurfaceUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwpLinuxBufferParamsV1, DmabufParamsData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZwpLinuxBufferParamsV1, request: <ZwpLinuxBufferParamsV1 as Resource>::Request, data: &DmabufParamsData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZwpLinuxBufferParamsV1, data: &DmabufParamsData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwpLinuxDmabufFeedbackV1, DmabufFeedbackData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZwpLinuxDmabufFeedbackV1, request: <ZwpLinuxDmabufFeedbackV1 as Resource>::Request, data: &DmabufFeedbackData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZwpLinuxDmabufFeedbackV1, data: &DmabufFeedbackData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwpLinuxDmabufV1, DmabufData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZwpLinuxDmabufV1, request: <ZwpLinuxDmabufV1 as Resource>::Request, data: &DmabufData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZwpLinuxDmabufV1, data: &DmabufData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwpPointerConstraintsV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZwpPointerConstraintsV1, request: <ZwpPointerConstraintsV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZwpPointerConstraintsV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwpPrimarySelectionDeviceManagerV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZwpPrimarySelectionDeviceManagerV1, request: <ZwpPrimarySelectionDeviceManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZwpPrimarySelectionDeviceManagerV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwpRelativePointerManagerV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZwpRelativePointerManagerV1, request: <ZwpRelativePointerManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZwpRelativePointerManagerV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwpRelativePointerV1, RelativePointerUserData<AppState>> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZwpRelativePointerV1, request: <ZwpRelativePointerV1 as Resource>::Request, data: &RelativePointerUserData<Self>, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZwpRelativePointerV1, data: &RelativePointerUserData<Self>, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwpVirtualKeyboardManagerV1, ()> for AppState

Source§

fn request( _state: &mut Self, _client: &Client, _resource: &ZwpVirtualKeyboardManagerV1, request: Request, _data: &(), _dh: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
§

fn destroyed( _state: &mut State, _client: ClientId, _resource: &I, _data: &UserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZwpVirtualKeyboardV1, PfVirtualKeyboard> for AppState

Source§

fn destroyed( state: &mut Self, _client: ClientId, _resource: &ZwpVirtualKeyboardV1, data: &PfVirtualKeyboard, )

Release every seat key this virtual keyboard still holds, so a VK client that disconnects mid-press cannot leave keys logically stuck.

Source§

fn request( state: &mut Self, _client: &Client, resource: &ZwpVirtualKeyboardV1, request: Request, data: &PfVirtualKeyboard, _dh: &DisplayHandle, _data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

impl Dispatch<ZxdgDecorationManagerV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZxdgDecorationManagerV1, request: <ZxdgDecorationManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZxdgDecorationManagerV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZxdgOutputManagerV1, ()> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZxdgOutputManagerV1, request: <ZxdgOutputManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZxdgOutputManagerV1, data: &(), )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZxdgOutputV1, XdgOutputUserData> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZxdgOutputV1, request: <ZxdgOutputV1 as Resource>::Request, data: &XdgOutputUserData, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZxdgOutputV1, data: &XdgOutputUserData, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl Dispatch<ZxdgToplevelDecorationV1, ToplevelSurface> for AppState

Source§

fn request( state: &mut Self, client: &Client, resource: &ZxdgToplevelDecorationV1, request: <ZxdgToplevelDecorationV1 as Resource>::Request, data: &ToplevelSurface, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )

Called when a request from a client is processed. Read more
Source§

fn destroyed( state: &mut Self, client: ClientId, resource: &ZxdgToplevelDecorationV1, data: &ToplevelSurface, )

Called when the object this user data is associated with has been destroyed. Read more
Source§

impl DmabufHandler for AppState

Linux-dmabuf protocol: imports client dmabufs into the GLES renderer.

dmabuf_imported attempts the import into the GLES renderer and signals the client through the notifier — success only when a GLES renderer exists and the import succeeds, otherwise failure (the software / pixman path advertises no dmabuf global, so it always fails here).

Source§

fn dmabuf_state(&mut self) -> &mut DmabufState

Returns a mutable reference to the [DmabufState] delegate type.
Source§

fn dmabuf_imported( &mut self, _global: &DmabufGlobal, dmabuf: Dmabuf, notifier: ImportNotifier, )

This function is called when a client has imported a [Dmabuf]. Read more
§

fn new_surface_feedback( &mut self, _surface: &WlSurface, _global: &DmabufGlobal, ) -> Option<DmabufFeedback>

This function allows to override the default [DmabufFeedback] for a surface Read more
Source§

impl DndFocus<AppState> for FocusTarget

Forward drag-and-drop focus events (enter / motion / leave / drop) to the wrapped target’s underlying wl_surface, reusing the WlSurface offer-data type.

Source§

type OfferData<S: Source> = <WlSurface as DndFocus<AppState>>::OfferData<S>

OfferData implementation returned by this target
Source§

fn enter<S: Source>( &self, data: &mut AppState, dh: &DisplayHandle, source: Arc<S>, seat: &Seat<AppState>, location: Point<f64, Logical>, serial: &Serial, ) -> Option<Self::OfferData<S>>

An active Drag’n’Drop operation has entered the client
Source§

fn motion<S: Source>( &self, data: &mut AppState, offer: Option<&mut Self::OfferData<S>>, seat: &Seat<AppState>, location: Point<f64, Logical>, time: u32, )

An active Drag’n’Drop operation, which has previously entered the client, has been moved
Source§

fn leave<S: Source>( &self, data: &mut AppState, offer: Option<&mut Self::OfferData<S>>, seat: &Seat<AppState>, )

An active Drag’n’Drop operation, which has previously entered the client, left again.
Source§

fn drop<S: Source>( &self, data: &mut AppState, offer: Option<&mut Self::OfferData<S>>, seat: &Seat<AppState>, )

An active Drag’n’Drop operation, which has previously entered the client, has been dropped.
Source§

impl ForeignToplevelListHandler for AppState

Foreign-toplevel-list protocol: exposes the managed state so Smithay can advertise each toplevel (title / app-id) to listing clients such as taskbars.

Source§

fn foreign_toplevel_list_state(&mut self) -> &mut ForeignToplevelListState

[ForeignToplevelListState] getter
Source§

impl FractionalScaleHandler for AppState

Fractional-scale protocol: tells a newly-bound surface the output’s current fractional scale so it renders at the right pixel density.

Source§

fn new_fractional_scale(&mut self, surface: WlSurface)

A new fractional scale was instantiated
Source§

impl GlobalDispatch<ExtForeignToplevelListV1, ForeignToplevelListGlobalData> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<ExtForeignToplevelListV1>, global_data: &ForeignToplevelListGlobalData, data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &ForeignToplevelListGlobalData) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<ExtImageCopyCaptureManagerV1, ImageCopyCaptureGlobalData> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<ExtImageCopyCaptureManagerV1>, global_data: &ImageCopyCaptureGlobalData, data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &ImageCopyCaptureGlobalData) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<ExtOutputImageCaptureSourceManagerV1, OutputCaptureSourceGlobalData> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<ExtOutputImageCaptureSourceManagerV1>, global_data: &OutputCaptureSourceGlobalData, data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &OutputCaptureSourceGlobalData) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WlCompositor, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WlCompositor>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WlDataDeviceManager, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WlDataDeviceManager>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WlOutput, WlOutputData> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WlOutput>, global_data: &WlOutputData, data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &WlOutputData) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WlSeat, SeatGlobalData<AppState>> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WlSeat>, global_data: &SeatGlobalData<AppState>, data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &SeatGlobalData<AppState>) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WlShm, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WlShm>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WlSubcompositor, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WlSubcompositor>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WpCursorShapeManagerV1, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WpCursorShapeManagerV1>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WpFractionalScaleManagerV1, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WpFractionalScaleManagerV1>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WpPointerWarpV1, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WpPointerWarpV1>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WpPresentation, u32> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WpPresentation>, global_data: &u32, data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &u32) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WpSinglePixelBufferManagerV1, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WpSinglePixelBufferManagerV1>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<WpViewporter, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<WpViewporter>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<XdgActivationV1, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<XdgActivationV1>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<XdgWmBase, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<XdgWmBase>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<ZwlrLayerShellV1, WlrLayerShellGlobalData> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<ZwlrLayerShellV1>, global_data: &WlrLayerShellGlobalData, data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &WlrLayerShellGlobalData) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<ZwpLinuxDmabufV1, DmabufGlobalData> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<ZwpLinuxDmabufV1>, global_data: &DmabufGlobalData, data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &DmabufGlobalData) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<ZwpPointerConstraintsV1, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<ZwpPointerConstraintsV1>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<ZwpRelativePointerManagerV1, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<ZwpRelativePointerManagerV1>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<ZwpVirtualKeyboardManagerV1, ()> for AppState

Source§

fn bind( _state: &mut Self, _dh: &DisplayHandle, _client: &Client, resource: New<ZwpVirtualKeyboardManagerV1>, _global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
§

fn can_view(_client: Client, _global_data: &GlobalData) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<ZxdgDecorationManagerV1, XdgDecorationManagerGlobalData> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<ZxdgDecorationManagerV1>, global_data: &XdgDecorationManagerGlobalData, data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view( client: Client, global_data: &XdgDecorationManagerGlobalData, ) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl GlobalDispatch<ZxdgOutputManagerV1, ()> for AppState

Source§

fn bind( state: &mut Self, dhandle: &DisplayHandle, client: &Client, resource: New<ZxdgOutputManagerV1>, global_data: &(), data_init: &mut DataInit<'_, Self>, )

Called when a client has bound this global. Read more
Source§

fn can_view(client: Client, global_data: &()) -> bool

Checks if the global should be advertised to some client. Read more
Source§

impl ImageCaptureSourceHandler for AppState

Source§

fn source_destroyed(&mut self, _source: ImageCaptureSource)

Called when a capture source is destroyed. Read more
Source§

impl ImageCopyCaptureHandler for AppState

ext-image-copy-capture: external clients capturing this compositor’s outputs.

A dmabuf-capable client gets the render formats of the GLES renderer and its frames are filled with one GPU blit from the output’s composited buffer; an shm client gets a readback. Frames complete from the render loop, never from a stale backbuffer.

Source§

fn image_copy_capture_state(&mut self) -> &mut ImageCopyCaptureState

Returns a mutable reference to the [ImageCopyCaptureState] delegate type.
Source§

fn capture_constraints( &mut self, source: &ImageCaptureSource, ) -> Option<BufferConstraints>

Return buffer constraints for capturing the given source. Read more
Source§

fn new_session(&mut self, session: CopySession)

Called when a new capture session is created. Read more
Source§

fn frame(&mut self, session: &CopySessionRef, frame: CopyFrame)

Called when a frame capture is requested. Read more
Source§

fn frame_aborted(&mut self, frame: CopyFrameRef)

Called when a frame is aborted (e.g., buffer destroyed before capture) or the client disconnects. Read more
Source§

fn session_destroyed(&mut self, session: CopySessionRef)

Called when a session is destroyed. Read more
§

fn cursor_capture_constraints( &mut self, source: &ImageCaptureSource, pointer: &WlPointer, ) -> Option<BufferConstraints>

Return buffer constraints for capturing the cursor on the given source. Read more
§

fn new_cursor_session(&mut self, session: CursorSession)

Called when a new cursor capture session is created.
§

fn cursor_frame(&mut self, session: &CursorSessionRef, frame: Frame)

Called when a cursor frame capture is requested.
§

fn cursor_session_destroyed(&mut self, session: CursorSessionRef)

Called when a cursor session is destroyed. Read more
Source§

impl KeyboardTarget<AppState> for FocusTarget

Forward every keyboard event (enter / leave / key / modifiers) to the wrapped target’s underlying wl_surface, which carries Smithay’s real keyboard-target implementation.

Source§

fn enter( &self, seat: &Seat<AppState>, data: &mut AppState, keys: Vec<KeysymHandle<'_>>, serial: Serial, )

Keyboard focus of a given seat was assigned to this handler
Source§

fn leave(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)

The keyboard focus of a given seat left this handler
Source§

fn key( &self, seat: &Seat<AppState>, data: &mut AppState, key: KeysymHandle<'_>, state: KeyState, serial: Serial, time: u32, )

A key was pressed on a keyboard from a given seat
Source§

fn modifiers( &self, seat: &Seat<AppState>, data: &mut AppState, modifiers: ModifiersState, serial: Serial, )

Hold modifiers were changed on a keyboard from a given seat
§

fn replace( &self, replaced: <D as SeatHandler>::KeyboardFocus, seat: &Seat<D>, data: &mut D, keys: Vec<KeysymHandle<'_>>, modifiers: ModifiersState, serial: Serial, )

Keyboard focus of a given seat moved from another handler to this handler
Source§

impl OutputCaptureSourceHandler for AppState

Source§

fn output_capture_source_state(&mut self) -> &mut OutputCaptureSourceState

Returns a mutable reference to the [OutputCaptureSourceState].
Source§

fn output_source_created(&mut self, source: ImageCaptureSource, output: &Output)

Called when a capture source is created from an output. Read more
Source§

impl OutputHandler for AppState

Output protocol marker impl (no per-output callbacks are needed).

§

fn output_bound(&mut self, _output: Output, _wl_output: WlOutput)

A client bound a new wl_output instance.
Source§

impl PointerConstraintsHandler for AppState

Pointer-constraints protocol wiring. The headless capture path never enforces a lock or confinement region, so activation and cursor-position hints are accepted as no-ops; the global still exists so clients may bind it without error.

Source§

fn new_constraint( &mut self, _surface: &WlSurface, _pointer: &PointerHandle<Self>, )

Pointer lock or confinement constraint created for pointer on surface Read more
Source§

fn cursor_position_hint( &mut self, _surface: &WlSurface, _pointer: &PointerHandle<Self>, _location: Point<f64, Logical>, )

The client holding a LockedPointer has committed a cursor position hint. Read more
Source§

impl PointerTarget<AppState> for FocusTarget

Forward every pointer event (motion, buttons, axis, and all swipe / pinch / hold gesture phases) to the wrapped target’s underlying wl_surface.

Source§

fn enter(&self, seat: &Seat<AppState>, data: &mut AppState, event: &MotionEvent)

A pointer of a given seat entered this handler
Source§

fn motion( &self, seat: &Seat<AppState>, data: &mut AppState, event: &MotionEvent, )

A pointer of a given seat moved over this handler
Source§

fn relative_motion( &self, seat: &Seat<AppState>, data: &mut AppState, event: &RelativeMotionEvent, )

A pointer of a given seat that provides relative motion moved over this handler
Source§

fn button( &self, seat: &Seat<AppState>, data: &mut AppState, event: &ButtonEvent, )

A pointer of a given seat clicked a button
Source§

fn axis(&self, seat: &Seat<AppState>, data: &mut AppState, frame: AxisFrame)

A pointer of a given seat scrolled on an axis
Source§

fn frame(&self, seat: &Seat<AppState>, data: &mut AppState)

End of a pointer frame
Source§

fn leave( &self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial, time: u32, )

A pointer of a given seat left this handler
Source§

fn gesture_swipe_begin( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureSwipeBeginEvent, )

A pointer of a given seat started a swipe gesture
Source§

fn gesture_swipe_update( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureSwipeUpdateEvent, )

A pointer of a given seat updated a swipe gesture
Source§

fn gesture_swipe_end( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureSwipeEndEvent, )

A pointer of a given seat ended a swipe gesture
Source§

fn gesture_pinch_begin( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GesturePinchBeginEvent, )

A pointer of a given seat started a pinch gesture
Source§

fn gesture_pinch_update( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GesturePinchUpdateEvent, )

A pointer of a given seat updated a pinch gesture
Source§

fn gesture_pinch_end( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GesturePinchEndEvent, )

A pointer of a given seat ended a pinch gesture
Source§

fn gesture_hold_begin( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureHoldBeginEvent, )

A pointer of a given seat started a hold gesture
Source§

fn gesture_hold_end( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureHoldEndEvent, )

A pointer of a given seat ended a hold gesture
§

fn replace( &self, replaced: <D as SeatHandler>::PointerFocus, seat: &Seat<D>, data: &mut D, event: &MotionEvent, )

A pointer of a given seat moved from another handler to this handler
Source§

impl PointerWarpHandler for AppState

Pointer-warp protocol: lets a client teleport the pointer to a surface-local position (games / remote-desktop style warps).

warp_pointer locates the requesting surface’s origin in the global space, adds the requested surface-local offset to get a global position, recomputes what element lies under it, and emits a synthetic motion event so focus and enter/leave follow the warp.

Source§

fn warp_pointer( &mut self, surface: WlSurface, _pointer: WlPointer, pos: Point<f64, Logical>, serial: Serial, )

Request the compositor to move the pointer to a surface-local position. Whether or not the compositor honors the request is implementation defined, but it should Read more
Source§

impl PrimarySelectionHandler for AppState

Carry the X11-style primary selection so middle-click paste works between clients. Exposing the managed state lets Smithay record which client currently owns the primary selection; focus_changed then keeps that ownership tracking keyboard focus, so a middle-click pastes from whichever client the user is actually working in.

Source§

fn primary_selection_state(&mut self) -> &mut PrimarySelectionState

[PrimarySelectionState] getter.
Source§

impl SeatHandler for AppState

Seat wiring: declares the keyboard / pointer / touch focus types and reacts to cursor changes and keyboard-focus moves.

Source§

fn cursor_image(&mut self, _seat: &Seat<AppState>, image: CursorImageStatus)

A client requested a cursor change (named, hidden, or surface-backed): retain it as the current icon and forward it to the Python cursor callback. A surface-backed one is delivered by the surface’s commit or by flush_pending_cursor, whichever is first.

Source§

fn focus_changed( &mut self, seat: &Seat<AppState>, focus: Option<&Self::KeyboardFocus>, )

Keep BOTH selections’ focus following keyboard focus: without the data-device half, the focused client never receives wl_data_offer events and Ctrl+V paste is a silent no-op even while the compositor-side selection is correct (primary covers only middle-click paste).

Source§

type KeyboardFocus = FocusTarget

Type used to represent the target currently holding the keyboard focus
Source§

type PointerFocus = FocusTarget

Type used to represent the target currently holding the pointer focus
Source§

type TouchFocus = FocusTarget

Type used to represent the target currently holding the touch focus
Source§

fn seat_state(&mut self) -> &mut SeatState<AppState>

[SeatState] getter
§

fn led_state_changed(&mut self, _seat: &Seat<Self>, _led_state: LedState)

Callback that will be notified whenever the keyboard led state changes.
Source§

impl SelectionHandler for AppState

Selection (clipboard) bridge between Wayland clients and Python. SelectionUserData is the Python-owned payload (mime, bytes) served to pasting clients when Python holds the selection.

Source§

fn new_selection( &mut self, ty: SelectionTarget, source: Option<SelectionSource>, seat: Seat<Self>, )

A client took the clipboard: pick the best offered mime and stage it for the loop to read.

Only client-owned clipboard (not primary) selections are relayed to Python. Among the source’s offered mimes it chooses the most specific match from CLIPBOARD_MIME_PREFERENCE and records it in pending_clipboard_read. The read itself is deferred: the new source is stored only after this handler returns, so process_pending_clipboard_read runs post-dispatch and reads the new selection rather than the previous one.

Source§

fn send_selection( &mut self, ty: SelectionTarget, _mime_type: String, fd: OwnedFd, _seat: Seat<Self>, user_data: &Self::SelectionUserData, )

A client pastes the Python-owned selection: stream the stored bytes into the client’s fd on a spawned thread, since the receiving pipe may backpressure. Bounded by an idle deadline: a client that never reads its paste fd must not pin the thread.

Source§

type SelectionUserData = Arc<(String, Vec<u8>)>

UserData attached to server-side selections.
Source§

impl ShmHandler for AppState

wl_shm protocol: exposes the shared-memory buffer state.

Source§

fn shm_state(&self) -> &ShmState

Return the Shm global state
Source§

impl TabletSeatHandler for AppState

No graphics tablets exist here (input is injected); the default no-op tool-image callback is all cursor-shape’s tablet half needs.

§

fn tablet_tool_image( &mut self, tool: &TabletToolDescriptor, image: CursorImageStatus, )

Callback that will be notified whenever a client requests to set a custom tool image.
Source§

impl TouchTarget<AppState> for FocusTarget

Forward every touch event (down / up / motion / frame / cancel / shape / orientation) to the wrapped target’s underlying wl_surface.

Source§

fn down( &self, seat: &Seat<AppState>, data: &mut AppState, event: &DownEvent, serial: Serial, )

A new touch point has appeared on the target. Read more
Source§

fn up( &self, seat: &Seat<AppState>, data: &mut AppState, event: &UpEvent, serial: Serial, )

The touch point has disappeared. Read more
Source§

fn motion( &self, seat: &Seat<AppState>, data: &mut AppState, event: &MotionEvent, serial: Serial, )

A touch point has changed coordinates.
Source§

fn frame(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)

Indicates the end of a set of events that logically belong together.
Source§

fn cancel(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)

Touch session cancelled. Read more
Source§

fn shape( &self, seat: &Seat<AppState>, data: &mut AppState, event: &ShapeEvent, serial: Serial, )

Sent when a touch point has changed its shape. Read more
Source§

fn orientation( &self, seat: &Seat<AppState>, data: &mut AppState, event: &OrientationEvent, serial: Serial, )

Sent when a touch point has changed its orientation. Read more
Source§

impl WaylandDndGrabHandler for AppState

Marker impl enabling Wayland drag-and-drop grabs with Smithay’s default behavior.

§

fn dnd_requested<S>( &mut self, source: S, icon: Option<WlSurface>, seat: Seat<Self>, serial: Serial, type_: GrabType, )
where S: Source,

A client requested a drag’n’drop as response to a user pointer action Read more
Source§

impl WlrLayerShellHandler for AppState

wlr-layer-shell protocol: places panels / overlays / backgrounds (layer surfaces).

new_layer_surface resolves the requested output (or the first output), configures the surface to that output’s full pixel size, and maps it into the output’s layer map so the render loop composites it in the correct z-order. layer_destroyed needs no action here.

Source§

fn shell_state(&mut self) -> &mut WlrLayerShellState

[WlrLayerShellState] getter
Source§

fn new_layer_surface( &mut self, surface: WlrLayerSurface, output: Option<WlOutput>, _layer: WlrLayer, namespace: String, )

A new layer surface was created Read more
Source§

fn layer_destroyed(&mut self, _surface: WlrLayerSurface)

A layer surface was destroyed. Read more
§

fn new_popup(&mut self, parent: LayerSurface, popup: PopupSurface)

A new popup was assigned a layer surface as it’s parent
§

fn ack_configure( &mut self, surface: WlSurface, configure: LayerSurfaceConfigure, )

A surface has acknowledged a configure serial.
Source§

impl XdgActivationHandler for AppState

xdg-activation protocol: hands out activation tokens and, on redemption, raises the target window.

token_created accepts every token. request_activation honors a token only while it is fresh (issued less than 10 seconds ago) so a stale or replayed token cannot steal focus, then raises the window whose surface matches to the top of the space.

Source§

fn activation_state(&mut self) -> &mut XdgActivationState

Returns the activation state.
Source§

fn token_created( &mut self, _token: XdgActivationToken, _data: XdgActivationTokenData, ) -> bool

A client has created a new token. Read more
Source§

fn request_activation( &mut self, _token: XdgActivationToken, token_data: XdgActivationTokenData, surface: WlSurface, )

A client has requested surface activation. Read more
Source§

impl XdgDecorationHandler for AppState

Default every toplevel to server-side decorations so clients don’t bake their own title bars and borders into the captured image.

The frontend shows fullscreen application content with no window-manager chrome, so a client left to draw client-side decorations would paint a stray title bar straight into the encoded frame. Pinning the negotiation to Mode::ServerSide (in new_decoration, and again when a client unsets its preference in unset_mode) hands decoration duty to the compositor — which draws none — leaving clean, borderless output; request_mode still grants a mode a client explicitly insists on. Each path acknowledges with a configure.

Source§

fn new_decoration(&mut self, toplevel: ToplevelSurface)

Notification the client supports server side decoration on the toplevel.
Source§

fn request_mode(&mut self, toplevel: ToplevelSurface, mode: Mode)

Notification the client prefers the provided decoration decoration mode on the toplevel.
Source§

fn unset_mode(&mut self, toplevel: ToplevelSurface)

Notification the client does not prefer a particular decoration mode on the toplevel.
Source§

impl XdgShellHandler for AppState

xdg-shell protocol: toplevel and popup lifecycle.

Source§

fn new_toplevel(&mut self, surface: ToplevelSurface)

A new toplevel appears: wrap it in a Window, queue it for mapping, and register a foreign-toplevel handle (seeded with title / app-id) stored on the surface for later updates. The window is pinned to the pointer’s output HERE — the first commit can’t be relied on for that, because a decoration-negotiating client (foot) has its initial configure sent by new_decoration before it ever commits, skipping the pre-configure commit branch.

Source§

fn new_popup(&mut self, surface: PopupSurface, _positioner: PositionerState)

Register a new popup (menu, tooltip, combo-box list) with the PopupManager so it takes part in grab and dismissal handling, then send the initial configure xdg-shell requires before the client is allowed to draw it.

Source§

fn grab(&mut self, surface: PopupSurface, _seat: WlSeat, serial: Serial)

Popup grab: find the popup’s root surface and its window, then install a popup grab so dismissal and pointer routing behave correctly.

Source§

fn reposition_request( &mut self, surface: PopupSurface, _positioner: PositionerState, token: u32, )

Re-track a popup whose position changed (e.g. a submenu flipping sides to stay on-screen) so the PopupManager follows its new geometry, then echo the client’s reposition token back to confirm the move took effect.

Source§

fn fullscreen_request( &mut self, surface: ToplevelSurface, output: Option<WlOutput>, )

Client fullscreen request: always granted at the compositor’s forced-fullscreen geometry (the CURRENT logical size), so the toggle gets a definite answer. A request naming an output moves the window there, which is how a nested compositor puts each of its screens on a monitor of its choosing.

Source§

fn unfullscreen_request(&mut self, surface: ToplevelSurface)

Client unfullscreen request: the forced-fullscreen policy stands, but the client still receives an explicit configure at the current geometry (the Smithay default sends NOTHING here, leaving the app waiting on a toggle that never answers).

Source§

fn maximize_request(&mut self, surface: ToplevelSurface)

Maximize request: answered with the forced-fullscreen configure (same geometry).

Source§

fn unmaximize_request(&mut self, surface: ToplevelSurface)

Unmaximize request: explicit current-geometry configure, policy unchanged.

Source§

fn toplevel_destroyed(&mut self, surface: ToplevelSurface)

A toplevel closed: drop it from the pending-window queue so a window that never finished mapping can’t linger there, unmap it from the space at once so list_windows and hit-testing never see a husk (the periodic space.refresh would only reap it later), and remove its foreign-toplevel handle so taskbar-style clients stop listing a window that is gone.

Source§

fn xdg_shell_state(&mut self) -> &mut XdgShellState

[XdgShellState] getter
§

fn new_client(&mut self, client: ShellClient)

A new shell client was instantiated
§

fn client_pong(&mut self, client: ShellClient)

The pong for a pending ping of this shell client was received Read more
§

fn move_request( &mut self, surface: ToplevelSurface, seat: WlSeat, serial: Serial, )

The client requested the start of an interactive move for this surface
§

fn resize_request( &mut self, surface: ToplevelSurface, seat: WlSeat, serial: Serial, edges: ResizeEdge, )

The client requested the start of an interactive resize for this surface
§

fn minimize_request(&mut self, surface: ToplevelSurface)

A toplevel surface requested to be minimized
§

fn show_window_menu( &mut self, surface: ToplevelSurface, seat: WlSeat, serial: Serial, location: Point<i32, Logical>, )

The client requests the window menu to be displayed on this surface at this location Read more
§

fn ack_configure(&mut self, surface: WlSurface, configure: Configure)

A surface has acknowledged a configure serial.
§

fn client_destroyed(&mut self, client: ShellClient)

A shell client was destroyed. Read more
§

fn popup_destroyed(&mut self, surface: PopupSurface)

A popup surface was destroyed. Read more
§

fn app_id_changed(&mut self, surface: ToplevelSurface)

The toplevel surface set a different app id.
§

fn title_changed(&mut self, surface: ToplevelSurface)

The toplevel surface set a different title.
§

fn parent_changed(&mut self, surface: ToplevelSurface)

The parent of a toplevel surface has changed.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more