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:
-
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 isNonewhenever 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_joinreturns that thread’s hardware session on shutdown so a restart can reconfigure it in place rather than rebuild it. Both areNonewhile 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_genadvances 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.
-
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. -
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. -
Clipboard (
pending_clipboard_read): stages the mime chosen innew_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. -
GPU selection (
auto_gpu_selected): records that automatic (not explicit) selection pickedrender_node_path, soStartCaptureaims 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: RustCaptureSettingsMirror of the PRIMARY display’s capture settings (geometry fallbacks, computer-use info); per-display settings live on each capture.
cursor_callback_set: boolA 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: KeymapPolicySeat 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: boolA 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: boolWhether 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§
Trait Implementations§
Source§impl BufferHandler for AppState
Buffer lifecycle hook: buffer destruction needs no bookkeeping here.
impl BufferHandler for AppState
Buffer lifecycle hook: buffer destruction needs no bookkeeping here.
Source§fn buffer_destroyed(&mut self, _buffer: &WlBuffer)
fn buffer_destroyed(&mut self, _buffer: &WlBuffer)
Source§impl CompositorHandler for AppState
Core wl_compositor protocol: per-surface commit handling plus the window
map/configure/focus state machine.
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)
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:
- Buffer intake:
on_commit_buffer_handleringests the newly attached buffer. - Layer relayout: if the surface is a mapped layer surface, re-arrange the output’s layer map so geometry tracks the new content.
- Cursor refresh: if the surface backs the current cursor, re-send its image so a client animating its own cursor surface is reflected downstream.
- Foreign-toplevel metadata: push the current title / app-id to the foreign-toplevel handle for taskbar-style clients.
- Window on-commit: forward the commit to the matching mapped
Window. - 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
fn compositor_state(&mut self) -> &mut CompositorState
Source§fn client_compositor_state<'a>(
&self,
client: &'a Client,
) -> &'a CompositorClientState
fn client_compositor_state<'a>( &self, client: &'a Client, ) -> &'a CompositorClientState
§fn new_surface(&mut self, surface: &WlSurface)
fn new_surface(&mut self, surface: &WlSurface)
§fn new_subsurface(&mut self, surface: &WlSurface, parent: &WlSurface)
fn new_subsurface(&mut self, surface: &WlSurface, parent: &WlSurface)
Source§impl DataControlHandler for AppState
wlr-data-control protocol: exposes the managed state so privileged clients can read and
set selections.
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
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.
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
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.
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
fn data_device_state(&mut self) -> &mut DataDeviceState
§fn action_choice(
&mut self,
available: DndAction,
preferred: DndAction,
) -> DndAction
fn action_choice( &mut self, available: DndAction, preferred: DndAction, ) -> DndAction
Source§impl Dispatch<ExtForeignToplevelHandleV1, ForeignToplevelHandle> for AppState
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>,
)
fn request( state: &mut Self, client: &Client, resource: &ExtForeignToplevelHandleV1, request: <ExtForeignToplevelHandleV1 as Resource>::Request, data: &ForeignToplevelHandle, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )
Source§impl Dispatch<ExtForeignToplevelListV1, ()> for AppState
impl Dispatch<ExtForeignToplevelListV1, ()> for AppState
Source§impl Dispatch<ExtImageCaptureSourceV1, ImageCaptureSourceData> for AppState
impl Dispatch<ExtImageCaptureSourceV1, ImageCaptureSourceData> for AppState
Source§impl Dispatch<ExtImageCopyCaptureManagerV1, ()> for AppState
impl Dispatch<ExtImageCopyCaptureManagerV1, ()> for AppState
Source§impl Dispatch<ExtOutputImageCaptureSourceManagerV1, ()> for AppState
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>,
)
fn request( state: &mut Self, client: &Client, resource: &ExtOutputImageCaptureSourceManagerV1, request: <ExtOutputImageCaptureSourceManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )
Source§impl Dispatch<WlBuffer, Dmabuf> for AppState
impl Dispatch<WlBuffer, Dmabuf> for AppState
Source§impl Dispatch<WlBuffer, ShmBufferUserData> for AppState
impl Dispatch<WlBuffer, ShmBufferUserData> for AppState
Source§impl Dispatch<WlBuffer, SinglePixelBufferUserData> for AppState
impl Dispatch<WlBuffer, SinglePixelBufferUserData> for AppState
Source§impl Dispatch<WlCallback, ()> for AppState
impl Dispatch<WlCallback, ()> for AppState
Source§impl Dispatch<WlCompositor, ()> for AppState
impl Dispatch<WlCompositor, ()> for AppState
Source§impl Dispatch<WlDataDeviceManager, ()> for AppState
impl Dispatch<WlDataDeviceManager, ()> for AppState
Source§impl Dispatch<WlKeyboard, KeyboardUserData<AppState>> for AppState
impl Dispatch<WlKeyboard, KeyboardUserData<AppState>> for AppState
Source§impl Dispatch<WlOutput, OutputUserData> for AppState
impl Dispatch<WlOutput, OutputUserData> for AppState
Source§impl Dispatch<WlPointer, PointerUserData<AppState>> for AppState
impl Dispatch<WlPointer, PointerUserData<AppState>> for AppState
Source§impl Dispatch<WlRegion, RegionUserData> for AppState
impl Dispatch<WlRegion, RegionUserData> for AppState
Source§impl Dispatch<WlSeat, SeatUserData<AppState>> for AppState
impl Dispatch<WlSeat, SeatUserData<AppState>> for AppState
Source§impl Dispatch<WlShm, ()> for AppState
impl Dispatch<WlShm, ()> for AppState
Source§impl Dispatch<WlShmPool, ShmPoolUserData> for AppState
impl Dispatch<WlShmPool, ShmPoolUserData> for AppState
Source§impl Dispatch<WlSubcompositor, ()> for AppState
impl Dispatch<WlSubcompositor, ()> for AppState
Source§impl Dispatch<WlSubsurface, SubsurfaceUserData> for AppState
impl Dispatch<WlSubsurface, SubsurfaceUserData> for AppState
Source§impl Dispatch<WlSurface, SurfaceUserData> for AppState
impl Dispatch<WlSurface, SurfaceUserData> for AppState
Source§impl Dispatch<WlTouch, TouchUserData<AppState>> for AppState
impl Dispatch<WlTouch, TouchUserData<AppState>> for AppState
Source§impl Dispatch<WpCursorShapeManagerV1, ()> for AppState
impl Dispatch<WpCursorShapeManagerV1, ()> for AppState
Source§impl Dispatch<WpFractionalScaleManagerV1, ()> for AppState
impl Dispatch<WpFractionalScaleManagerV1, ()> for AppState
Source§impl Dispatch<WpFractionalScaleV1, Weak<WlSurface>> for AppState
impl Dispatch<WpFractionalScaleV1, Weak<WlSurface>> for AppState
Source§impl Dispatch<WpPointerWarpV1, ()> for AppState
impl Dispatch<WpPointerWarpV1, ()> for AppState
Source§impl Dispatch<WpPresentation, u32> for AppState
impl Dispatch<WpPresentation, u32> for AppState
Source§impl Dispatch<WpPresentationFeedback, ()> for AppState
impl Dispatch<WpPresentationFeedback, ()> for AppState
Source§impl Dispatch<WpSinglePixelBufferManagerV1, ()> for AppState
impl Dispatch<WpSinglePixelBufferManagerV1, ()> for AppState
Source§impl Dispatch<WpViewport, ViewportState> for AppState
impl Dispatch<WpViewport, ViewportState> for AppState
Source§impl Dispatch<WpViewporter, ()> for AppState
impl Dispatch<WpViewporter, ()> for AppState
Source§impl Dispatch<XdgActivationTokenV1, ActivationTokenData> for AppState
impl Dispatch<XdgActivationTokenV1, ActivationTokenData> for AppState
Source§impl Dispatch<XdgActivationV1, ()> for AppState
impl Dispatch<XdgActivationV1, ()> for AppState
Source§impl Dispatch<XdgPopup, XdgShellSurfaceUserData> for AppState
impl Dispatch<XdgPopup, XdgShellSurfaceUserData> for AppState
Source§impl Dispatch<XdgPositioner, XdgPositionerUserData> for AppState
impl Dispatch<XdgPositioner, XdgPositionerUserData> for AppState
Source§impl Dispatch<XdgSurface, XdgSurfaceUserData> for AppState
impl Dispatch<XdgSurface, XdgSurfaceUserData> for AppState
Source§impl Dispatch<XdgToplevel, XdgShellSurfaceUserData> for AppState
impl Dispatch<XdgToplevel, XdgShellSurfaceUserData> for AppState
Source§impl Dispatch<XdgWmBase, XdgWmBaseUserData> for AppState
impl Dispatch<XdgWmBase, XdgWmBaseUserData> for AppState
Source§impl Dispatch<ZwlrLayerShellV1, ()> for AppState
impl Dispatch<ZwlrLayerShellV1, ()> for AppState
Source§impl Dispatch<ZwlrLayerSurfaceV1, WlrLayerSurfaceUserData> for AppState
impl Dispatch<ZwlrLayerSurfaceV1, WlrLayerSurfaceUserData> for AppState
Source§impl Dispatch<ZwpLinuxBufferParamsV1, DmabufParamsData> for AppState
impl Dispatch<ZwpLinuxBufferParamsV1, DmabufParamsData> for AppState
Source§impl Dispatch<ZwpLinuxDmabufFeedbackV1, DmabufFeedbackData> for AppState
impl Dispatch<ZwpLinuxDmabufFeedbackV1, DmabufFeedbackData> for AppState
Source§impl Dispatch<ZwpLinuxDmabufV1, DmabufData> for AppState
impl Dispatch<ZwpLinuxDmabufV1, DmabufData> for AppState
Source§impl Dispatch<ZwpPointerConstraintsV1, ()> for AppState
impl Dispatch<ZwpPointerConstraintsV1, ()> for AppState
Source§impl Dispatch<ZwpPrimarySelectionDeviceManagerV1, ()> for AppState
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>,
)
fn request( state: &mut Self, client: &Client, resource: &ZwpPrimarySelectionDeviceManagerV1, request: <ZwpPrimarySelectionDeviceManagerV1 as Resource>::Request, data: &(), dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )
Source§impl Dispatch<ZwpRelativePointerManagerV1, ()> for AppState
impl Dispatch<ZwpRelativePointerManagerV1, ()> for AppState
Source§impl Dispatch<ZwpRelativePointerV1, RelativePointerUserData<AppState>> for AppState
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>,
)
fn request( state: &mut Self, client: &Client, resource: &ZwpRelativePointerV1, request: <ZwpRelativePointerV1 as Resource>::Request, data: &RelativePointerUserData<Self>, dhandle: &DisplayHandle, data_init: &mut DataInit<'_, Self>, )
Source§impl Dispatch<ZwpVirtualKeyboardManagerV1, ()> for AppState
impl Dispatch<ZwpVirtualKeyboardManagerV1, ()> for AppState
Source§impl Dispatch<ZwpVirtualKeyboardV1, PfVirtualKeyboard> for AppState
impl Dispatch<ZwpVirtualKeyboardV1, PfVirtualKeyboard> for AppState
Source§fn destroyed(
state: &mut Self,
_client: ClientId,
_resource: &ZwpVirtualKeyboardV1,
data: &PfVirtualKeyboard,
)
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>,
)
fn request( state: &mut Self, _client: &Client, resource: &ZwpVirtualKeyboardV1, request: Request, data: &PfVirtualKeyboard, _dh: &DisplayHandle, _data_init: &mut DataInit<'_, Self>, )
Source§impl Dispatch<ZxdgDecorationManagerV1, ()> for AppState
impl Dispatch<ZxdgDecorationManagerV1, ()> for AppState
Source§impl Dispatch<ZxdgOutputManagerV1, ()> for AppState
impl Dispatch<ZxdgOutputManagerV1, ()> for AppState
Source§impl Dispatch<ZxdgOutputV1, XdgOutputUserData> for AppState
impl Dispatch<ZxdgOutputV1, XdgOutputUserData> for AppState
Source§impl Dispatch<ZxdgToplevelDecorationV1, ToplevelSurface> for AppState
impl Dispatch<ZxdgToplevelDecorationV1, ToplevelSurface> for AppState
Source§impl DmabufHandler for AppState
Linux-dmabuf protocol: imports client dmabufs into the GLES renderer.
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
fn dmabuf_state(&mut self) -> &mut DmabufState
DmabufState] delegate type.Source§fn dmabuf_imported(
&mut self,
_global: &DmabufGlobal,
dmabuf: Dmabuf,
notifier: ImportNotifier,
)
fn dmabuf_imported( &mut self, _global: &DmabufGlobal, dmabuf: Dmabuf, notifier: ImportNotifier, )
Dmabuf]. Read more§fn new_surface_feedback(
&mut self,
_surface: &WlSurface,
_global: &DmabufGlobal,
) -> Option<DmabufFeedback>
fn new_surface_feedback( &mut self, _surface: &WlSurface, _global: &DmabufGlobal, ) -> Option<DmabufFeedback>
DmabufFeedback] for a surface Read moreSource§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.
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>
type OfferData<S: Source> = <WlSurface as DndFocus<AppState>>::OfferData<S>
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>>
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>>
Source§fn motion<S: Source>(
&self,
data: &mut AppState,
offer: Option<&mut Self::OfferData<S>>,
seat: &Seat<AppState>,
location: Point<f64, Logical>,
time: u32,
)
fn motion<S: Source>( &self, data: &mut AppState, offer: Option<&mut Self::OfferData<S>>, seat: &Seat<AppState>, location: Point<f64, Logical>, time: u32, )
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.
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
fn foreign_toplevel_list_state(&mut self) -> &mut ForeignToplevelListState
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.
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)
fn new_fractional_scale(&mut self, surface: WlSurface)
Source§impl GlobalDispatch<ExtForeignToplevelListV1, ForeignToplevelListGlobalData> for AppState
impl GlobalDispatch<ExtForeignToplevelListV1, ForeignToplevelListGlobalData> for AppState
Source§impl GlobalDispatch<ExtImageCopyCaptureManagerV1, ImageCopyCaptureGlobalData> for AppState
impl GlobalDispatch<ExtImageCopyCaptureManagerV1, ImageCopyCaptureGlobalData> for AppState
Source§impl GlobalDispatch<ExtOutputImageCaptureSourceManagerV1, OutputCaptureSourceGlobalData> for AppState
impl GlobalDispatch<ExtOutputImageCaptureSourceManagerV1, OutputCaptureSourceGlobalData> for AppState
Source§impl GlobalDispatch<WlCompositor, ()> for AppState
impl GlobalDispatch<WlCompositor, ()> for AppState
Source§impl GlobalDispatch<WlDataDeviceManager, ()> for AppState
impl GlobalDispatch<WlDataDeviceManager, ()> for AppState
Source§impl GlobalDispatch<WlOutput, WlOutputData> for AppState
impl GlobalDispatch<WlOutput, WlOutputData> for AppState
Source§impl GlobalDispatch<WlSeat, SeatGlobalData<AppState>> for AppState
impl GlobalDispatch<WlSeat, SeatGlobalData<AppState>> for AppState
Source§impl GlobalDispatch<WlShm, ()> for AppState
impl GlobalDispatch<WlShm, ()> for AppState
Source§impl GlobalDispatch<WlSubcompositor, ()> for AppState
impl GlobalDispatch<WlSubcompositor, ()> for AppState
Source§impl GlobalDispatch<WpCursorShapeManagerV1, ()> for AppState
impl GlobalDispatch<WpCursorShapeManagerV1, ()> for AppState
Source§impl GlobalDispatch<WpFractionalScaleManagerV1, ()> for AppState
impl GlobalDispatch<WpFractionalScaleManagerV1, ()> for AppState
Source§impl GlobalDispatch<WpPointerWarpV1, ()> for AppState
impl GlobalDispatch<WpPointerWarpV1, ()> for AppState
Source§impl GlobalDispatch<WpPresentation, u32> for AppState
impl GlobalDispatch<WpPresentation, u32> for AppState
Source§impl GlobalDispatch<WpSinglePixelBufferManagerV1, ()> for AppState
impl GlobalDispatch<WpSinglePixelBufferManagerV1, ()> for AppState
Source§impl GlobalDispatch<WpViewporter, ()> for AppState
impl GlobalDispatch<WpViewporter, ()> for AppState
Source§impl GlobalDispatch<XdgActivationV1, ()> for AppState
impl GlobalDispatch<XdgActivationV1, ()> for AppState
Source§impl GlobalDispatch<XdgWmBase, ()> for AppState
impl GlobalDispatch<XdgWmBase, ()> for AppState
Source§impl GlobalDispatch<ZwlrLayerShellV1, WlrLayerShellGlobalData> for AppState
impl GlobalDispatch<ZwlrLayerShellV1, WlrLayerShellGlobalData> for AppState
Source§impl GlobalDispatch<ZwpLinuxDmabufV1, DmabufGlobalData> for AppState
impl GlobalDispatch<ZwpLinuxDmabufV1, DmabufGlobalData> for AppState
Source§impl GlobalDispatch<ZwpPointerConstraintsV1, ()> for AppState
impl GlobalDispatch<ZwpPointerConstraintsV1, ()> for AppState
Source§impl GlobalDispatch<ZwpRelativePointerManagerV1, ()> for AppState
impl GlobalDispatch<ZwpRelativePointerManagerV1, ()> for AppState
Source§impl GlobalDispatch<ZwpVirtualKeyboardManagerV1, ()> for AppState
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>,
)
fn bind( _state: &mut Self, _dh: &DisplayHandle, _client: &Client, resource: New<ZwpVirtualKeyboardManagerV1>, _global_data: &(), data_init: &mut DataInit<'_, Self>, )
§fn can_view(_client: Client, _global_data: &GlobalData) -> bool
fn can_view(_client: Client, _global_data: &GlobalData) -> bool
Source§impl GlobalDispatch<ZxdgDecorationManagerV1, XdgDecorationManagerGlobalData> for AppState
impl GlobalDispatch<ZxdgDecorationManagerV1, XdgDecorationManagerGlobalData> for AppState
Source§impl GlobalDispatch<ZxdgOutputManagerV1, ()> for AppState
impl GlobalDispatch<ZxdgOutputManagerV1, ()> for AppState
Source§impl ImageCaptureSourceHandler for AppState
impl ImageCaptureSourceHandler for AppState
Source§fn source_destroyed(&mut self, _source: ImageCaptureSource)
fn source_destroyed(&mut self, _source: ImageCaptureSource)
Source§impl ImageCopyCaptureHandler for AppState
ext-image-copy-capture: external clients capturing this compositor’s outputs.
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
fn image_copy_capture_state(&mut self) -> &mut ImageCopyCaptureState
ImageCopyCaptureState] delegate type.Source§fn capture_constraints(
&mut self,
source: &ImageCaptureSource,
) -> Option<BufferConstraints>
fn capture_constraints( &mut self, source: &ImageCaptureSource, ) -> Option<BufferConstraints>
Source§fn new_session(&mut self, session: CopySession)
fn new_session(&mut self, session: CopySession)
Source§fn frame(&mut self, session: &CopySessionRef, frame: CopyFrame)
fn frame(&mut self, session: &CopySessionRef, frame: CopyFrame)
Source§fn frame_aborted(&mut self, frame: CopyFrameRef)
fn frame_aborted(&mut self, frame: CopyFrameRef)
Source§fn session_destroyed(&mut self, session: CopySessionRef)
fn session_destroyed(&mut self, session: CopySessionRef)
§fn cursor_capture_constraints(
&mut self,
source: &ImageCaptureSource,
pointer: &WlPointer,
) -> Option<BufferConstraints>
fn cursor_capture_constraints( &mut self, source: &ImageCaptureSource, pointer: &WlPointer, ) -> Option<BufferConstraints>
§fn new_cursor_session(&mut self, session: CursorSession)
fn new_cursor_session(&mut self, session: CursorSession)
§fn cursor_frame(&mut self, session: &CursorSessionRef, frame: Frame)
fn cursor_frame(&mut self, session: &CursorSessionRef, frame: Frame)
§fn cursor_session_destroyed(&mut self, session: CursorSessionRef)
fn cursor_session_destroyed(&mut self, session: CursorSessionRef)
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.
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,
)
fn enter( &self, seat: &Seat<AppState>, data: &mut AppState, keys: Vec<KeysymHandle<'_>>, serial: Serial, )
Source§fn leave(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
fn leave(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
Source§fn key(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
key: KeysymHandle<'_>,
state: KeyState,
serial: Serial,
time: u32,
)
fn key( &self, seat: &Seat<AppState>, data: &mut AppState, key: KeysymHandle<'_>, state: KeyState, serial: Serial, time: u32, )
Source§impl OutputCaptureSourceHandler for AppState
impl OutputCaptureSourceHandler for AppState
Source§fn output_capture_source_state(&mut self) -> &mut OutputCaptureSourceState
fn output_capture_source_state(&mut self) -> &mut OutputCaptureSourceState
OutputCaptureSourceState].Source§fn output_source_created(&mut self, source: ImageCaptureSource, output: &Output)
fn output_source_created(&mut self, source: ImageCaptureSource, output: &Output)
Source§impl OutputHandler for AppState
Output protocol marker impl (no per-output callbacks are needed).
impl OutputHandler for AppState
Output protocol marker impl (no per-output callbacks are needed).
§fn output_bound(&mut self, _output: Output, _wl_output: WlOutput)
fn output_bound(&mut self, _output: Output, _wl_output: WlOutput)
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.
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>,
)
fn new_constraint( &mut self, _surface: &WlSurface, _pointer: &PointerHandle<Self>, )
Source§fn cursor_position_hint(
&mut self,
_surface: &WlSurface,
_pointer: &PointerHandle<Self>,
_location: Point<f64, Logical>,
)
fn cursor_position_hint( &mut self, _surface: &WlSurface, _pointer: &PointerHandle<Self>, _location: Point<f64, Logical>, )
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.
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)
fn enter(&self, seat: &Seat<AppState>, data: &mut AppState, event: &MotionEvent)
Source§fn motion(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &MotionEvent,
)
fn motion( &self, seat: &Seat<AppState>, data: &mut AppState, event: &MotionEvent, )
Source§fn relative_motion(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &RelativeMotionEvent,
)
fn relative_motion( &self, seat: &Seat<AppState>, data: &mut AppState, event: &RelativeMotionEvent, )
Source§fn axis(&self, seat: &Seat<AppState>, data: &mut AppState, frame: AxisFrame)
fn axis(&self, seat: &Seat<AppState>, data: &mut AppState, frame: AxisFrame)
Source§fn leave(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
serial: Serial,
time: u32,
)
fn leave( &self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial, time: u32, )
Source§fn gesture_swipe_begin(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GestureSwipeBeginEvent,
)
fn gesture_swipe_begin( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureSwipeBeginEvent, )
Source§fn gesture_swipe_update(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GestureSwipeUpdateEvent,
)
fn gesture_swipe_update( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureSwipeUpdateEvent, )
Source§fn gesture_swipe_end(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GestureSwipeEndEvent,
)
fn gesture_swipe_end( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureSwipeEndEvent, )
Source§fn gesture_pinch_begin(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GesturePinchBeginEvent,
)
fn gesture_pinch_begin( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GesturePinchBeginEvent, )
Source§fn gesture_pinch_update(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GesturePinchUpdateEvent,
)
fn gesture_pinch_update( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GesturePinchUpdateEvent, )
Source§fn gesture_pinch_end(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GesturePinchEndEvent,
)
fn gesture_pinch_end( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GesturePinchEndEvent, )
Source§fn gesture_hold_begin(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GestureHoldBeginEvent,
)
fn gesture_hold_begin( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureHoldBeginEvent, )
Source§fn gesture_hold_end(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GestureHoldEndEvent,
)
fn gesture_hold_end( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureHoldEndEvent, )
Source§impl PointerWarpHandler for AppState
Pointer-warp protocol: lets a client teleport the pointer to a surface-local position
(games / remote-desktop style warps).
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,
)
fn warp_pointer( &mut self, surface: WlSurface, _pointer: WlPointer, pos: Point<f64, Logical>, serial: Serial, )
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.
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
fn primary_selection_state(&mut self) -> &mut PrimarySelectionState
Source§impl SeatHandler for AppState
Seat wiring: declares the keyboard / pointer / touch focus types and reacts to cursor
changes and keyboard-focus moves.
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)
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>,
)
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 KeyboardFocus = FocusTarget
Source§type PointerFocus = FocusTarget
type PointerFocus = FocusTarget
Source§type TouchFocus = FocusTarget
type TouchFocus = FocusTarget
Source§fn seat_state(&mut self) -> &mut SeatState<AppState>
fn seat_state(&mut self) -> &mut SeatState<AppState>
§fn led_state_changed(&mut self, _seat: &Seat<Self>, _led_state: LedState)
fn led_state_changed(&mut self, _seat: &Seat<Self>, _led_state: LedState)
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.
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>,
)
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,
)
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§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.
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,
)
fn tablet_tool_image( &mut self, tool: &TabletToolDescriptor, image: CursorImageStatus, )
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.
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,
)
fn down( &self, seat: &Seat<AppState>, data: &mut AppState, event: &DownEvent, serial: Serial, )
Source§fn up(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &UpEvent,
serial: Serial,
)
fn up( &self, seat: &Seat<AppState>, data: &mut AppState, event: &UpEvent, serial: Serial, )
Source§fn motion(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &MotionEvent,
serial: Serial,
)
fn motion( &self, seat: &Seat<AppState>, data: &mut AppState, event: &MotionEvent, serial: Serial, )
Source§fn frame(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
fn frame(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
Source§fn cancel(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
fn cancel(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
Source§impl WaylandDndGrabHandler for AppState
Marker impl enabling Wayland drag-and-drop grabs with Smithay’s default behavior.
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,
fn dnd_requested<S>(
&mut self,
source: S,
icon: Option<WlSurface>,
seat: Seat<Self>,
serial: Serial,
type_: GrabType,
)where
S: Source,
Source§impl WlrLayerShellHandler for AppState
wlr-layer-shell protocol: places panels / overlays / backgrounds (layer surfaces).
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
fn shell_state(&mut self) -> &mut WlrLayerShellState
Source§fn new_layer_surface(
&mut self,
surface: WlrLayerSurface,
output: Option<WlOutput>,
_layer: WlrLayer,
namespace: String,
)
fn new_layer_surface( &mut self, surface: WlrLayerSurface, output: Option<WlOutput>, _layer: WlrLayer, namespace: String, )
Source§fn layer_destroyed(&mut self, _surface: WlrLayerSurface)
fn layer_destroyed(&mut self, _surface: WlrLayerSurface)
§fn new_popup(&mut self, parent: LayerSurface, popup: PopupSurface)
fn new_popup(&mut self, parent: LayerSurface, popup: PopupSurface)
§fn ack_configure(
&mut self,
surface: WlSurface,
configure: LayerSurfaceConfigure,
)
fn ack_configure( &mut self, surface: WlSurface, configure: LayerSurfaceConfigure, )
Source§impl XdgActivationHandler for AppState
xdg-activation protocol: hands out activation tokens and, on redemption, raises the
target window.
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
fn activation_state(&mut self) -> &mut XdgActivationState
Source§fn token_created(
&mut self,
_token: XdgActivationToken,
_data: XdgActivationTokenData,
) -> bool
fn token_created( &mut self, _token: XdgActivationToken, _data: XdgActivationTokenData, ) -> bool
Source§fn request_activation(
&mut self,
_token: XdgActivationToken,
token_data: XdgActivationTokenData,
surface: WlSurface,
)
fn request_activation( &mut self, _token: XdgActivationToken, token_data: XdgActivationTokenData, surface: WlSurface, )
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.
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)
fn new_decoration(&mut self, toplevel: ToplevelSurface)
Source§fn request_mode(&mut self, toplevel: ToplevelSurface, mode: Mode)
fn request_mode(&mut self, toplevel: ToplevelSurface, mode: Mode)
Source§fn unset_mode(&mut self, toplevel: ToplevelSurface)
fn unset_mode(&mut self, toplevel: ToplevelSurface)
Source§impl XdgShellHandler for AppState
xdg-shell protocol: toplevel and popup lifecycle.
impl XdgShellHandler for AppState
xdg-shell protocol: toplevel and popup lifecycle.
Source§fn new_toplevel(&mut self, surface: ToplevelSurface)
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)
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)
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,
)
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>,
)
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)
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)
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)
fn unmaximize_request(&mut self, surface: ToplevelSurface)
Unmaximize request: explicit current-geometry configure, policy unchanged.
Source§fn toplevel_destroyed(&mut self, surface: ToplevelSurface)
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
fn xdg_shell_state(&mut self) -> &mut XdgShellState
§fn new_client(&mut self, client: ShellClient)
fn new_client(&mut self, client: ShellClient)
§fn client_pong(&mut self, client: ShellClient)
fn client_pong(&mut self, client: ShellClient)
§fn move_request(
&mut self,
surface: ToplevelSurface,
seat: WlSeat,
serial: Serial,
)
fn move_request( &mut self, surface: ToplevelSurface, seat: WlSeat, serial: Serial, )
§fn resize_request(
&mut self,
surface: ToplevelSurface,
seat: WlSeat,
serial: Serial,
edges: ResizeEdge,
)
fn resize_request( &mut self, surface: ToplevelSurface, seat: WlSeat, serial: Serial, edges: ResizeEdge, )
§fn minimize_request(&mut self, surface: ToplevelSurface)
fn minimize_request(&mut self, surface: ToplevelSurface)
§fn ack_configure(&mut self, surface: WlSurface, configure: Configure)
fn ack_configure(&mut self, surface: WlSurface, configure: Configure)
§fn client_destroyed(&mut self, client: ShellClient)
fn client_destroyed(&mut self, client: ShellClient)
§fn popup_destroyed(&mut self, surface: PopupSurface)
fn popup_destroyed(&mut self, surface: PopupSurface)
§fn app_id_changed(&mut self, surface: ToplevelSurface)
fn app_id_changed(&mut self, surface: ToplevelSurface)
§fn title_changed(&mut self, surface: ToplevelSurface)
fn title_changed(&mut self, surface: ToplevelSurface)
§fn parent_changed(&mut self, surface: ToplevelSurface)
fn parent_changed(&mut self, surface: ToplevelSurface)
Auto Trait Implementations§
impl !Freeze for AppState
impl !RefUnwindSafe for AppState
impl !Send for AppState
impl !Sync for AppState
impl !UnwindSafe for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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