pub struct AppState {Show 79 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 keyboard_shortcuts_inhibit_state: KeyboardShortcutsInhibitState,
pub xdg_decoration_state: XdgDecorationState,
pub xdg_activation_state: XdgActivationState,
pub primary_selection_state: PrimarySelectionState,
pub popups: PopupManager,
pub(crate) screenshot_readbacks: ScreenshotReadbacks,
pub gles_renderer: Option<GlesRenderer>,
pub pixman_renderer: Option<PixmanRenderer>,
pub gbm_device: Option<Device<File>>,
pub settings: CaptureSettings,
pub cursor_callback_set: bool,
pub cursor_tx: Sender<CursorJob>,
pub clipboard_callback: Option<Arc<dyn ClipboardSink>>,
pub pending_clipboard_read: Option<Vec<String>>,
pub clipboard_generation: Arc<AtomicU64>,
pub current_selection_mimes: Vec<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 host_frame_tx: Sender<usize>,
pub host_mode_refusals: HashMap<u32, u32>,
pub current_cursor_icon: Option<CursorImageStatus>,
pub cursor_surface_pending: bool,
pub cursor_buffer: Option<WlBuffer>,
pub dnd_icon: Option<(WlSurface, Point<i32, Logical>)>,
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(crate) pending_screenshots: ScreenshotQueue,
pub command_rx: Option<Channel<ThreadCommand>>,
pub last_input_at: Option<Instant>,
pub pointer_motion_at: Option<Instant>,
pub input_interval: Option<Duration>,
pub pointer_share: Arc<PointerShare>,
pub motion_applied: u64,
pub frame_idle_long: bool,
pub last_idle_service_at: Option<Instant>,
pub deliver_reaper: Vec<JoinHandle<()>>,
pub encode_reaper: Vec<JoinHandle<Option<FrameEncoder>>>,
pub wm: Option<WmState>,
pub foreign_toplevel: ForeignToplevelState,
pub workspace: WorkspaceState,
pub xwm: XwmState,
pub loop_handle: LoopHandle<'static, AppState>,
pub keyboard_focus: Option<u32>,
}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 mimes chosen innew_selection, or a cleared selection; the loop drains them 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§keyboard_shortcuts_inhibit_state: KeyboardShortcutsInhibitStateThe shortcuts-inhibit protocol: a client whose window has the keyboard may ask that the window policy’s binds stand aside while it reads a chord (the desktop shell’s shortcut editor); the policy’s key filter honors an active inhibitor on the focused window.
xdg_decoration_state: XdgDecorationState§xdg_activation_state: XdgActivationState§primary_selection_state: PrimarySelectionState§popups: PopupManager§screenshot_readbacks: ScreenshotReadbacksScreenshot readback buffers, ahead of the renderer: dropped first, they forget their mappings while its GL context still holds them.
gles_renderer: Option<GlesRenderer>§pixman_renderer: Option<PixmanRenderer>§gbm_device: Option<Device<File>>§settings: CaptureSettingsMirror of the PRIMARY display’s capture settings (geometry fallbacks, computer-use info); per-display settings live on each capture.
cursor_callback_set: boolA cursor sink is registered on the wl-cursor worker (which owns it); tracked here
so sprite resolution is skipped while nobody listens.
cursor_tx: Sender<CursorJob>Cursor delivery jobs to the wl-cursor worker (PNG encode + sink call off-thread).
clipboard_callback: Option<Arc<dyn ClipboardSink>>§pending_clipboard_read: Option<Vec<String>>The mimes of the current client selection staged for one read, delivered together; an empty list stages the report of a selection a client cleared.
clipboard_generation: Arc<AtomicU64>Bumped by every staged delivery. A reader thread hands its entries over only while its delivery is still the newest, so a slow source cannot land after a later copy or clear.
current_selection_mimes: Vec<String>The mimes chosen from 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; empty 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 waits for the host to answer, then re-sizes the capture to the mode the host announces. Emptied with the host session.
host_frame_tx: Sender<usize>Wakes the calloop when a host capture thread has queued a frame, so its display
renders that frame at once (at frame pace, see FramePace) rather than on the next
timer tick.
host_mode_refusals: HashMap<u32, u32>Per display, how many mode requests in a row the host has answered with a different mode; cleared when it applies one. Past a few, the log names the remedy.
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>§dnd_icon: Option<(WlSurface, Point<i32, Logical>)>The icon a client’s drag carries, drawn at the pointer into every frame while the drag lasts (the cursor itself is the browser’s to draw, a drag’s icon is not), with the offset from the pointer its commits moved it to.
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_screenshots: ScreenshotQueueScreenshot readbacks waiting for their output’s next render.
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).
pointer_motion_at: Option<Instant>When the last pointer move landed, and the smoothed spacing between moves: what
tells a client pacing its moves at the frame cadence from a faster or slower one
(FramePace::input_paced). A gap longer than a few periods is a pause rather than a
spacing and is clamped before it enters the average.
input_interval: Option<Duration>Where the pointer is, published each event-loop pass for the backend’s pointer_location.
motion_applied: u64The highest motion number among the motion commands applied (PointerAt::motion).
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<FrameEncoder>>>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.
wm: Option<WmState>The installed window policy and what the compositor keeps for it; None leaves every
window fullscreen on its output (crate::wayland::wm).
foreign_toplevel: ForeignToplevelStateThe window list taskbars read (zwlr_foreign_toplevel_manager_v1).
workspace: WorkspaceStateThe virtual desktops pagers read and switch (ext_workspace_manager_v1).
xwm: XwmStateXwayland and its window manager, started under a window policy.
loop_handle: LoopHandle<'static, AppState>The compositor’s event loop, for sources started after it is up (Xwayland).
keyboard_focus: Option<u32>The window holding the keyboard, as the seat last reported it: read where the seat’s
own lock is held (focus_changed runs under it), where asking the keyboard would wait
on itself.
Implementations§
Source§impl AppState
impl AppState
Sourcepub(crate) fn window_of_toplevel(
&self,
toplevel: &ToplevelSurface,
) -> Option<Window>
pub(crate) fn window_of_toplevel( &self, toplevel: &ToplevelSurface, ) -> Option<Window>
The window (shown, pending, or hidden by the policy) a toplevel belongs to.
Sourcepub(crate) fn id_of_toplevel(&self, toplevel: &ToplevelSurface) -> Option<u32>
pub(crate) fn id_of_toplevel(&self, toplevel: &ToplevelSurface) -> Option<u32>
The policy’s id of a toplevel’s window.
Sourcepub(crate) fn primary_output(&self) -> Option<&Output>
pub(crate) fn primary_output(&self) -> Option<&Output>
The primary (display id 0) output.
pub(crate) fn node_idx_for_id(&self, id: u32) -> Option<usize>
Sourcepub(crate) fn view_ids_of(&self, id: u32) -> Vec<u32>
pub(crate) fn view_ids_of(&self, id: u32) -> Vec<u32>
The ids of the views onto id’s output.
Sourcepub(crate) fn screen_id_of(&self, id: u32) -> u32
pub(crate) fn screen_id_of(&self, id: u32) -> u32
The node whose output id draws from: itself, or the node it views.
Sourcepub(crate) fn node_idx_under(&self, p: Point<f64, Logical>) -> Option<usize>
pub(crate) fn node_idx_under(&self, p: Point<f64, Logical>) -> Option<usize>
Index of the node whose LOGICAL rect contains p.
Sourcepub(crate) fn layout_physical_to_logical(
&self,
x: f64,
y: f64,
) -> Point<f64, Logical>
pub(crate) fn layout_physical_to_logical( &self, x: f64, y: f64, ) -> Point<f64, Logical>
Map absolute PHYSICAL union-layout coordinates to a logical layout point: each output occupies the physical rectangle at its layout offset sized by its mode; the point is clamped into the nearest output when it falls outside all of them, so the pointer can never leave the layout.
Sourcepub(crate) fn pointer_locked(
&self,
pointer: &PointerHandle<Self>,
under: &Option<(FocusTarget, Point<f64, Logical>)>,
location: Point<f64, Logical>,
) -> bool
pub(crate) fn pointer_locked( &self, pointer: &PointerHandle<Self>, under: &Option<(FocusTarget, Point<f64, Logical>)>, location: Point<f64, Logical>, ) -> bool
Whether an active lock holds the pointer where it is, so a motion must carry the delta alone. Only the surface the pointer has entered can hold it, and only inside the region the lock names.
Sourcepub(crate) fn pointer_target_under(
&self,
p: Point<f64, Logical>,
) -> Option<(FocusTarget, Point<f64, Logical>)>
pub(crate) fn pointer_target_under( &self, p: Point<f64, Logical>, ) -> Option<(FocusTarget, Point<f64, Logical>)>
What the pointer targets at a logical layout point: an overlay layer surface, an X11
override-redirect window on top under the point, a top layer surface, then a window, then
a bottom or background layer surface, each through its popup where one lies under the
point, since a popup takes pointer events on its own surface. That is the order they are
drawn in. Layer geometry is output-local, so layers are hit-tested with the point local to
the output under it. Whatever is found is then resolved to the subsurface of its tree that
takes input at the point (FocusTarget::under_point): a subsurface takes pointer events
on its own surface too, and handed to the surface below it, a click on a browser’s bubble
lands on the page under the bubble.
While an X11 popup menu is open, the pointer is that menu’s wherever it is, outside the
menu too: an X11 client grabs the pointer for its menu and closes the menu on a click
elsewhere, but rootless Xwayland hears of the pointer only over its own windows, so a
click on a Wayland surface would leave the menu open and holding the pointer.
[x11_menu_open]’s window gets the events, at points Xwayland turns into the root
coordinates the grab is delivered with.
The topmost X11 popup menu that is open, with where it lies.
Sourcepub(crate) fn refocus_pointer(&mut self)
pub(crate) fn refocus_pointer(&mut self)
Hands pointer focus to what now lies under a still pointer once a window maps, unmaps, or moves, and ahead of a button or scroll that comes with no motion (a pointer-locked one), so input reaches what is shown there. A held grab keeps its focus until it ends. An enter reaches only the wl_pointers a client already holds and is not repeated to one bound later, so a client yet to bind one is not entered here: the window no longer shown is left, and the client’s first input after it binds enters it.
Sourcepub(crate) fn activate_constraint_under(
&self,
pointer: &PointerHandle<Self>,
under: &Option<(FocusTarget, Point<f64, Logical>)>,
location: Point<f64, Logical>,
)
pub(crate) fn activate_constraint_under( &self, pointer: &PointerHandle<Self>, under: &Option<(FocusTarget, Point<f64, Logical>)>, location: Point<f64, Logical>, )
Activates a constraint waiting on the surface the pointer has arrived over.
Sourcepub(crate) fn clamp_logical(
&self,
p: Point<f64, Logical>,
) -> Point<f64, Logical>
pub(crate) fn clamp_logical( &self, p: Point<f64, Logical>, ) -> Point<f64, Logical>
Clamp a logical layout point into the nearest output’s logical rectangle.
Sourcepub(crate) fn layout_logical_to_physical(
&self,
p: Point<f64, Logical>,
) -> (f64, f64)
pub(crate) fn layout_logical_to_physical( &self, p: Point<f64, Logical>, ) -> (f64, f64)
Logical layout point -> physical union-layout coordinates (inverse of
layout_physical_to_logical for in-bounds points; primary-relative otherwise).
Sourcepub(crate) fn layout_logical_to_physical_scaled(
&self,
p: Point<f64, Logical>,
) -> (f64, f64, f64)
pub(crate) fn layout_logical_to_physical_scaled( &self, p: Point<f64, Logical>, ) -> (f64, f64, f64)
layout_logical_to_physical, with the scale of the output it mapped through.
Sourcepub(crate) fn logical_size_of(&self, id: u32) -> Option<(i32, i32)>
pub(crate) fn logical_size_of(&self, id: u32) -> Option<(i32, i32)>
Logical size of the given display’s output.
Sourcepub(crate) fn release_grab_across_screens(
&mut self,
pointer: &PointerHandle<Self>,
under: &Option<(FocusTarget, Point<f64, Logical>)>,
serial: Serial,
time: InputTime,
)
pub(crate) fn release_grab_across_screens( &mut self, pointer: &PointerHandle<Self>, under: &Option<(FocusTarget, Point<f64, Logical>)>, serial: Serial, time: InputTime, )
A nested session opens one host toplevel per screen, and a drag it carries from one screen to the next is its own to continue: the implicit grab that would keep handing the first window motion past its edge is released at the crossing, so the pointer enters the next screen’s window and the session places its cursor through that window, at that screen’s scale. Only a click grab still holding the window it started on is released, and only for another window of the same client.
Sourcepub(crate) fn pointer_shown_at(&self) -> Option<Point<f64, Logical>>
pub(crate) fn pointer_shown_at(&self) -> Option<Point<f64, Logical>>
Where the pointer is shown: where the window policy took it while it takes the pointer’s
motion, else the seat’s pointer (crate::wayland::wm::judged_location). A frame drag
whose press grabbed for the client moves the window and not the seat’s pointer, so the
cursor drawn into the stream, the position the page is told, and the display the pointer
is on would otherwise stay where the drag began until it ends.
Sourcepub(crate) fn pointer_display(&self) -> u32
pub(crate) fn pointer_display(&self) -> u32
The display id under the pointer (primary when indeterminate).
Sourcepub(crate) fn would_cover_screen(&self, window: &Window, id: u32) -> bool
pub(crate) fn would_cover_screen(&self, window: &Window, id: u32) -> bool
Whether window would land on top of a screen another window from the same client
already occupies. A nested session opens one host toplevel per screen, and a second
one covering the first would replace what the display shows rather than add to it.
Sourcepub(crate) fn park_window(&mut self, window: &Window, id: u32)
pub(crate) fn park_window(&mut self, window: &Window, id: u32)
Map window clear of every output while keeping it tagged for id, so it holds its
size and its place in the window list without being composited anywhere. A nested
session’s spare screens wait here until create_output gives them one.
Sourcepub(crate) fn place_window_on_output(
&mut self,
window: &Window,
id: u32,
) -> bool
pub(crate) fn place_window_on_output( &mut self, window: &Window, id: u32, ) -> bool
Place window on output id: retag its meta, remap it at the output’s layout
origin, move output enter/leave, push the output’s fractional scale, and send the
forced-fullscreen configure at that output’s logical size.
Sourcepub(crate) fn process_pending_clipboard_read(&mut self)
pub(crate) fn process_pending_clipboard_read(&mut self)
Drain the clipboard delivery staged by new_selection and hand its (mime, bytes)
entries, the flavors of one copy, to the clipboard sink off-thread; a cleared selection
is handed over as no entries.
Runs from the loop after the dispatch that stored the new client source, so the requests
target the current selection rather than the previous one. It clones the callback, opens a
pipe per mime, and asks the owning client source to write each into its pipe’s writer. A
spawned reader thread then reads the responses in turn. The overall bound is by SIZE (64
MiB per flavor, then delivered truncated) so a hostile client cannot balloon memory; time
only bounds INACTIVITY — a producer that keeps bytes flowing may take as long as it needs
(a large transfer from a slow source still delivers), while one that goes silent for 10 s
without closing its fd is dropped so each clipboard change cannot leak a pinned thread +
pipe. Deliveries leave in the order they were staged: one that a later copy or clear
overtook is dropped (clipboard_generation). The SHUTDOWN checks keep this off a
consumer that is gone.
Sourcepub(crate) fn send_cursor_image(&mut self, image: &CursorImageStatus)
pub(crate) fn send_cursor_image(&mut self, image: &CursorImageStatus)
Resolve a CursorImageStatus into a job for the wl-cursor worker, which does the
PNG encode, caching, and the GIL-bound Python call off the calloop thread. Also re-invoked
from the calloop command handlers to replay the retained cursor when a callback
(re)registers or a capture restarts.
Only the renderer/surface-affine work happens here:
-
Named / Hidden: forwarded as-is (the worker owns its own theme handle).
-
Surface (a client-supplied cursor sprite): ignore any surface without the
cursor_imagerole, read the hotspot, then read the backing buffer by one of two paths:- SHM: hash only the sprite’s sub-region — width/height/stride/offset/format plus the
pixel span — because many sprites share one pool and differ only by
offset, so hashing the whole pool would collide; ship the raw pool bytes plus descriptor to the worker. - dmabuf (
NotManaged): bind it to the GLES renderer, copy the framebuffer toAbgr8888, map it back (calloop-affine), and ship the raw RGBA readback.
A sprite whose buffer could not be read is dropped by the worker, preserving the consumer’s last cursor instead of blanking it (only “hide” carries empty data).
- SHM: hash only the sprite’s sub-region — width/height/stride/offset/format plus the
pixel span — because many sprites share one pool and differ only by
Sourcepub(crate) fn flush_pending_cursor(&mut self)
pub(crate) fn flush_pending_cursor(&mut self)
Deliver a surface-backed cursor whose dispatch ended without a commit of its surface (a client re-showing a sprite it attached earlier).
Sourcepub(crate) fn apply_keymap_policy(&mut self)
pub(crate) fn apply_keymap_policy(&mut self)
Re-apply the policy’s keymap (base + overlays) to the seat keyboard, broadcasting to clients only when the content actually changed (smithay dedupes by content hash).
Sourcepub(crate) fn apply_keymap_text(&mut self, text: String)
pub(crate) fn apply_keymap_text(&mut self, text: String)
Deliver text as the seat keymap (and the host virtual keyboard’s, in
host-capture mode). Empty text is ignored.
Sourcepub(crate) fn bind_keysyms(&mut self, keysyms: &[u32]) -> Vec<(u32, u32)>
pub(crate) fn bind_keysyms(&mut self, keysyms: &[u32]) -> Vec<(u32, u32)>
Resolve keysyms to (keycode, level) pairs, overlay-binding whatever the base
cannot produce — at most ONE keymap swap for the whole batch, and never rebinding a
keycode that is currently held down. Serves computer-use; the interactive input path
resolves keysyms in selkies and injects plain keycodes.
Sourcepub(crate) fn bind_keysyms_plain(&mut self, keysyms: &[u32]) -> Vec<u32>
pub(crate) fn bind_keysyms_plain(&mut self, keysyms: &[u32]) -> Vec<u32>
bind_keysyms restricted to level-0 resolutions (see
KeymapPolicy::bind_many_plain); used by the virtual-keyboard translation path, which
cannot synthesize modifiers.
Sourcepub(crate) fn send_forced_fullscreen_configure(
&mut self,
toplevel: &ToplevelSurface,
)
pub(crate) fn send_forced_fullscreen_configure( &mut self, toplevel: &ToplevelSurface, )
Answer any client fullscreen/maximize (un)set request with the compositor’s forced policy: every toplevel is Fullscreen+Activated at the CURRENT logical size of the output the window is placed on. The configure is always sent, so an app toggling fullscreen gets an explicit, current-geometry answer instead of silence or stale pending state.
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<ExtWorkspaceGroupHandleV1, ()> for AppState
impl Dispatch<ExtWorkspaceGroupHandleV1, ()> for AppState
Source§impl Dispatch<ExtWorkspaceHandleV1, HandleData> for AppState
impl Dispatch<ExtWorkspaceHandleV1, HandleData> for AppState
Source§fn request(
state: &mut Self,
_client: &Client,
_handle: &ExtWorkspaceHandleV1,
request: Request,
data: &HandleData,
_dh: &DisplayHandle,
_data_init: &mut DataInit<'_, Self>,
)
fn request( state: &mut Self, _client: &Client, _handle: &ExtWorkspaceHandleV1, request: Request, data: &HandleData, _dh: &DisplayHandle, _data_init: &mut DataInit<'_, Self>, )
Source§impl Dispatch<ExtWorkspaceManagerV1, ()> for AppState
impl Dispatch<ExtWorkspaceManagerV1, ()> for AppState
Source§impl<I, UserData> Dispatch<I, UserData> for AppStatewhere
I: Resource,
UserData: Dispatch2<I, AppState>,
impl<I, UserData> Dispatch<I, UserData> for AppStatewhere
I: Resource,
UserData: Dispatch2<I, AppState>,
Source§impl Dispatch<ZwlrForeignToplevelHandleV1, HandleData> for AppState
impl Dispatch<ZwlrForeignToplevelHandleV1, HandleData> for AppState
Source§fn request(
state: &mut Self,
_client: &Client,
handle: &ZwlrForeignToplevelHandleV1,
request: Request,
data: &HandleData,
_dh: &DisplayHandle,
_data_init: &mut DataInit<'_, Self>,
)
fn request( state: &mut Self, _client: &Client, handle: &ZwlrForeignToplevelHandleV1, request: Request, data: &HandleData, _dh: &DisplayHandle, _data_init: &mut DataInit<'_, Self>, )
Source§impl Dispatch<ZwlrForeignToplevelManagerV1, ()> for AppState
impl Dispatch<ZwlrForeignToplevelManagerV1, ()> for AppState
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 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: InputTime,
)
fn motion<S: Source>( &self, data: &mut AppState, offer: Option<&mut Self::OfferData<S>>, seat: &Seat<AppState>, location: Point<f64, Logical>, time: InputTime, )
Source§impl DndGrabHandler for AppState
The end of a drag-and-drop grab, an X11 client’s or a Wayland client’s: the drag’s icon is
no longer drawn.
impl DndGrabHandler for AppState
The end of a drag-and-drop grab, an X11 client’s or a Wayland client’s: the drag’s icon is no longer drawn.
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<ExtWorkspaceManagerV1, ()> for AppState
impl GlobalDispatch<ExtWorkspaceManagerV1, ()> for AppState
Source§fn bind(
state: &mut Self,
_dh: &DisplayHandle,
client: &Client,
resource: New<ExtWorkspaceManagerV1>,
_global_data: &(),
data_init: &mut DataInit<'_, Self>,
)
fn bind( state: &mut Self, _dh: &DisplayHandle, client: &Client, resource: New<ExtWorkspaceManagerV1>, _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<I, UserData> GlobalDispatch<I, UserData> for AppStatewhere
I: Resource,
UserData: GlobalDispatch2<I, AppState>,
impl<I, UserData> GlobalDispatch<I, UserData> for AppStatewhere
I: Resource,
UserData: GlobalDispatch2<I, AppState>,
Source§impl GlobalDispatch<ZwlrForeignToplevelManagerV1, ()> for AppState
impl GlobalDispatch<ZwlrForeignToplevelManagerV1, ()> for AppState
Source§fn bind(
state: &mut Self,
_dh: &DisplayHandle,
client: &Client,
resource: New<ZwlrForeignToplevelManagerV1>,
_global_data: &(),
data_init: &mut DataInit<'_, Self>,
)
fn bind( state: &mut Self, _dh: &DisplayHandle, client: &Client, resource: New<ZwlrForeignToplevelManagerV1>, _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<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 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 KeyboardShortcutsInhibitHandler for AppState
xdg-activation protocol: hands out activation tokens and, on redemption, raises the
target window.
impl KeyboardShortcutsInhibitHandler 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 new_inhibitor(&mut self, inhibitor: KeyboardShortcutsInhibitor)
fn new_inhibitor(&mut self, inhibitor: KeyboardShortcutsInhibitor)
An inhibitor is granted only to the window that holds the keyboard, so a client cannot take the session’s shortcuts away from behind another window.
Source§fn keyboard_shortcuts_inhibit_state(
&mut self,
) -> &mut KeyboardShortcutsInhibitState
fn keyboard_shortcuts_inhibit_state( &mut self, ) -> &mut KeyboardShortcutsInhibitState
§fn inhibitor_destroyed(&mut self, inhibitor: KeyboardShortcutsInhibitor)
fn inhibitor_destroyed(&mut self, inhibitor: KeyboardShortcutsInhibitor)
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; a
subsurface’s events go to the surface it belongs to, since keyboard focus is a whole
window’s.
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; a
subsurface’s events go to the surface it belongs to, since keyboard focus is a whole
window’s.
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: InputTime,
)
fn key( &self, seat: &Seat<AppState>, data: &mut AppState, key: KeysymHandle<'_>, state: KeyState, serial: Serial, time: InputTime, )
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: a wl_output a client binds after the globals that name outputs enters
the workspace group and the window handles on it, since those enters reach only the
objects the client held when they were sent.
impl OutputHandler for AppState
Output protocol: a wl_output a client binds after the globals that name outputs enters
the workspace group and the window handles on it, since those enters reach only the
objects the client held when they were sent.
Source§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. A lock is activated for the surface the pointer already holds,
and activate_constraint_under picks up one asked for ahead of the pointer when the motion
that enters it arrives: SDL asks as relative mode goes on, which is before it has the pointer.
Confinement regions and cursor-position hints are still accepted as no-ops.
impl PointerConstraintsHandler for AppState
Pointer-constraints protocol. A lock is activated for the surface the pointer already holds,
and activate_constraint_under picks up one asked for ahead of the pointer when the motion
that enters it arrives: SDL asks as relative mode goes on, which is before it has the pointer.
Confinement regions and cursor-position hints are still accepted as no-ops.
Source§fn new_constraint(&mut self, surface: &WlSurface, pointer: &PointerHandle<Self>)
fn new_constraint(&mut self, surface: &WlSurface, pointer: &PointerHandle<Self>)
§fn remove_constraint(
&mut self,
_surface: &WlSurface,
_pointer: &PointerHandle<Self>,
_constraint_remove: ConstraintRemove,
)
fn remove_constraint( &mut self, _surface: &WlSurface, _pointer: &PointerHandle<Self>, _constraint_remove: ConstraintRemove, )
§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: InputTime,
)
fn leave( &self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial, time: InputTime, )
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)
§fn click_grab(
&mut self,
start_data: GrabStartData<Self>,
) -> impl PointerGrab<Self>
fn click_grab( &mut self, start_data: GrabStartData<Self>, ) -> impl PointerGrab<Self>
§fn touch_down_grab(
&mut self,
start_data: GrabStartData<Self>,
) -> impl TouchGrab<Self>
fn touch_down_grab( &mut self, start_data: GrabStartData<Self>, ) -> impl TouchGrab<Self>
Source§impl SelectionHandler for AppState
Selection (clipboard) bridge between Wayland clients and Python. SelectionUserData is
the Python-owned payload, one (mime, bytes) entry per offered flavor, 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, one (mime, bytes) entry per offered flavor, 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, or cleared it: pick the flavors to read and stage them for the loop.
Only client-owned clipboard (not primary) selections are relayed to Python. The source’s
flavors (clipboard_flavors) are recorded in pending_clipboard_read, and a cleared
selection as no flavors. 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, and a tool would focus plain surfaces.
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, and a tool would focus plain surfaces.
Source§type ToolFocus = WlSurface
type ToolFocus = WlSurface
§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)
fn down(&self, seat: &Seat<AppState>, data: &mut AppState, event: &DownEvent)
Source§fn up(&self, seat: &Seat<AppState>, data: &mut AppState, event: &UpEvent)
fn up(&self, seat: &Seat<AppState>, data: &mut AppState, event: &UpEvent)
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 frame(&self, seat: &Seat<AppState>, data: &mut AppState, marker: FrameMarker)
fn frame(&self, seat: &Seat<AppState>, data: &mut AppState, marker: FrameMarker)
Source§fn cancel(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
marker: FrameMarker,
)
fn cancel( &self, seat: &Seat<AppState>, data: &mut AppState, marker: FrameMarker, )
Source§fn shape(&self, seat: &Seat<AppState>, data: &mut AppState, event: &ShapeEvent)
fn shape(&self, seat: &Seat<AppState>, data: &mut AppState, event: &ShapeEvent)
Source§impl WaylandDndGrabHandler for AppState
wl_data_device.start_drag: a client’s drag becomes Smithay’s drag-and-drop grab on the
pointer or the touch point that started it, which offers the source to the surface under it,
Wayland or X11 through the X11 window manager’s bridge, and drops it on release; its icon is
drawn at the pointer until then (AppState::dnd_icon). The trait’s own default cancels every
drag, which left a drag between two windows, or out of one, ending as it began.
impl WaylandDndGrabHandler for AppState
wl_data_device.start_drag: a client’s drag becomes Smithay’s drag-and-drop grab on the
pointer or the touch point that started it, which offers the source to the surface under it,
Wayland or X11 through the X11 window manager’s bridge, and drops it on release; its icon is
drawn at the pointer until then (AppState::dnd_icon). The trait’s own default cancels every
drag, which left a drag between two windows, or out of one, ending as it began.
Source§fn dnd_requested<S: Source>(
&mut self,
source: S,
icon: Option<WlSurface>,
seat: Seat<Self>,
serial: Serial,
type_: GrabType,
)
fn dnd_requested<S: Source>( &mut self, source: S, icon: Option<WlSurface>, seat: Seat<Self>, serial: Serial, type_: GrabType, )
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 drops the surface from every layer map
and arranges them again, so the work areas give back what it reserved.
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 XWaylandShellHandler for AppState
impl XWaylandShellHandler for AppState
Source§fn xwayland_shell_state(&mut self) -> &mut XWaylandShellState
fn xwayland_shell_state(&mut self) -> &mut XWaylandShellState
§fn surface_associated(
&mut self,
xwm: XwmId,
wl_surface: WlSurface,
surface: X11Surface,
)
fn surface_associated( &mut self, xwm: XwmId, wl_surface: WlSurface, surface: X11Surface, )
Source§impl XdgActivationHandler for AppState
impl XdgActivationHandler for AppState
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 or layer surface, 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: the policy’s where one is installed, else the forced-fullscreen configure (same geometry).
Source§fn unmaximize_request(&mut self, surface: ToplevelSurface)
fn unmaximize_request(&mut self, surface: ToplevelSurface)
Unmaximize request: the policy’s, else an explicit current-geometry configure.
Source§fn minimize_request(&mut self, surface: ToplevelSurface)
fn minimize_request(&mut self, surface: ToplevelSurface)
Minimize request: the policy’s; without one every window stays as it is.
Source§fn move_request(
&mut self,
surface: ToplevelSurface,
_seat: WlSeat,
_serial: Serial,
)
fn move_request( &mut self, surface: ToplevelSurface, _seat: WlSeat, _serial: Serial, )
An interactive move the client started from a button it holds: the policy’s drag.
Source§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, )
An interactive resize the client started: the policy’s drag on the named edge.
The client asks for its window menu: the policy’s, at the point in the window.
Source§fn title_changed(&mut self, surface: ToplevelSurface)
fn title_changed(&mut self, surface: ToplevelSurface)
The title changed: the policy’s frame and the taskbars follow.
Source§fn app_id_changed(&mut self, surface: ToplevelSurface)
fn app_id_changed(&mut self, surface: ToplevelSurface)
The app id changed: the policy’s frame icon and the taskbars follow.
Source§fn parent_changed(&mut self, surface: ToplevelSurface)
fn parent_changed(&mut self, surface: ToplevelSurface)
The parent changed: the policy stacks and places the dialog over it.
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 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)
Source§impl XwmHandler for AppState
impl XwmHandler for AppState
Source§fn new_window(&mut self, _xwm: XwmId, _window: X11Surface)
fn new_window(&mut self, _xwm: XwmId, _window: X11Surface)
Source§fn new_override_redirect_window(&mut self, _xwm: XwmId, _window: X11Surface)
fn new_override_redirect_window(&mut self, _xwm: XwmId, _window: X11Surface)
Source§fn map_window_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn map_window_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn map_window_notify(&mut self, _xwm: XwmId, _window: X11Surface)
fn map_window_notify(&mut self, _xwm: XwmId, _window: X11Surface)
Source§fn mapped_override_redirect_window(&mut self, _xwm: XwmId, surface: X11Surface)
fn mapped_override_redirect_window(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn unmapped_window(&mut self, _xwm: XwmId, surface: X11Surface)
fn unmapped_window(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn destroyed_window(&mut self, _xwm: XwmId, surface: X11Surface)
fn destroyed_window(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn configure_request(
&mut self,
_xwm: XwmId,
surface: X11Surface,
x: Option<i32>,
y: Option<i32>,
w: Option<u32>,
h: Option<u32>,
reorder: Option<Reorder>,
)
fn configure_request( &mut self, _xwm: XwmId, surface: X11Surface, x: Option<i32>, y: Option<i32>, w: Option<u32>, h: Option<u32>, reorder: Option<Reorder>, )
Source§fn configure_notify(
&mut self,
_xwm: XwmId,
surface: X11Surface,
geometry: Rectangle<i32, Logical>,
_above: Option<u32>,
)
fn configure_notify( &mut self, _xwm: XwmId, surface: X11Surface, geometry: Rectangle<i32, Logical>, _above: Option<u32>, )
Source§fn property_notify(
&mut self,
_xwm: XwmId,
surface: X11Surface,
property: WmWindowProperty,
)
fn property_notify( &mut self, _xwm: XwmId, surface: X11Surface, property: WmWindowProperty, )
Source§fn maximize_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn maximize_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn unmaximize_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn unmaximize_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn fullscreen_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn fullscreen_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn unfullscreen_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn unfullscreen_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn minimize_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn minimize_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn unminimize_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn unminimize_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn above_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn above_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn unabove_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn unabove_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn below_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn below_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn unbelow_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn unbelow_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn shade_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn shade_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn unshade_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn unshade_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn demands_attention_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn demands_attention_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn undemands_attention_request(&mut self, _xwm: XwmId, surface: X11Surface)
fn undemands_attention_request(&mut self, _xwm: XwmId, surface: X11Surface)
Source§fn resize_request(
&mut self,
_xwm: XwmId,
surface: X11Surface,
_button: u32,
edges: X11ResizeEdge,
)
fn resize_request( &mut self, _xwm: XwmId, surface: X11Surface, _button: u32, edges: X11ResizeEdge, )
Source§fn move_request(&mut self, _xwm: XwmId, surface: X11Surface, _button: u32)
fn move_request(&mut self, _xwm: XwmId, surface: X11Surface, _button: u32)
Source§fn active_window_request(
&mut self,
_xwm: XwmId,
surface: X11Surface,
_timestamp: u32,
_current: Option<X11Surface>,
)
fn active_window_request( &mut self, _xwm: XwmId, surface: X11Surface, _timestamp: u32, _current: Option<X11Surface>, )
Source§fn allow_selection_access(
&mut self,
xwm: XwmId,
_selection: SelectionTarget,
) -> bool
fn allow_selection_access( &mut self, xwm: XwmId, _selection: SelectionTarget, ) -> bool
Source§fn send_selection(
&mut self,
_xwm: XwmId,
selection: SelectionTarget,
mime_type: String,
fd: OwnedFd,
)
fn send_selection( &mut self, _xwm: XwmId, selection: SelectionTarget, mime_type: String, fd: OwnedFd, )
Source§fn new_selection(
&mut self,
_xwm: XwmId,
selection: SelectionTarget,
mime_types: Vec<String>,
)
fn new_selection( &mut self, _xwm: XwmId, selection: SelectionTarget, mime_types: Vec<String>, )
Source§fn cleared_selection(&mut self, _xwm: XwmId, selection: SelectionTarget)
fn cleared_selection(&mut self, _xwm: XwmId, selection: SelectionTarget)
Source§fn show_desktop_request(&mut self, _xwm: XwmId)
fn show_desktop_request(&mut self, _xwm: XwmId)
Source§fn unshow_desktop_request(&mut self, _xwm: XwmId)
fn unshow_desktop_request(&mut self, _xwm: XwmId)
Source§fn disconnected(&mut self, _xwm: XwmId)
fn disconnected(&mut self, _xwm: XwmId)
§fn modal_request(&mut self, xwm: XwmId, window: X11Surface)
fn modal_request(&mut self, xwm: XwmId, window: X11Surface)
X11Surface::is_modal]).§fn unmodal_request(&mut self, xwm: XwmId, window: X11Surface)
fn unmodal_request(&mut self, xwm: XwmId, window: X11Surface)
§fn stick_request(&mut self, xwm: XwmId, window: X11Surface)
fn stick_request(&mut self, xwm: XwmId, window: X11Surface)
§fn unstick_request(&mut self, xwm: XwmId, window: X11Surface)
fn unstick_request(&mut self, xwm: XwmId, window: X11Surface)
§fn ping_acked(&mut self, xwm: XwmId, window: X11Surface, timestamp: u32)
fn ping_acked(&mut self, xwm: XwmId, window: X11Surface, timestamp: u32)
_NET_WM_PING request.§fn sync_request_acked(&mut self, xwm: XwmId, window: X11Surface)
fn sync_request_acked(&mut self, xwm: XwmId, window: X11Surface)
_NET_WM_SYNC_REQUEST request. Read more§fn sync_request_timeout(&mut self, xwm: XwmId, window: X11Surface)
fn sync_request_timeout(&mut self, xwm: XwmId, window: X11Surface)
_NET_WM_SYNC_REQUEST has timed out. Read more§fn randr_primary_output_change(
&mut self,
xwm: XwmId,
output_name: Option<String>,
)
fn randr_primary_output_change( &mut self, xwm: XwmId, output_name: Option<String>, )
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> ⓘ
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