pub struct Window {
pub id: u64,
pub title: Option<String>,
pub app_id: Option<String>,
pub pid: Option<i32>,
pub workspace_id: Option<u64>,
pub is_focused: bool,
pub is_floating: bool,
pub is_urgent: bool,
pub layout: WindowLayout,
pub focus_timestamp: Option<Timestamp>,
}Expand description
Toplevel window.
Fields§
§id: u64Unique id of this window.
This id remains constant while this window is open.
Do not assume that window ids will always increase without wrapping, or start at 1. That is an implementation detail subject to change. For example, ids may change to be randomly generated for each new window.
title: Option<String>Title, if set.
app_id: Option<String>Application ID, if set.
pid: Option<i32>Process ID that created the Wayland connection for this window, if known.
Currently, windows created by xdg-desktop-portal-gnome will have a None PID, but this may
change in the future.
workspace_id: Option<u64>Id of the workspace this window is on, if any.
is_focused: boolWhether this window is currently focused.
There can be either one focused window or zero (e.g. when a layer-shell surface has focus).
is_floating: boolWhether this window is currently floating.
If the window isn’t floating then it is in the tiling layout.
is_urgent: boolWhether this window requests your attention.
layout: WindowLayoutPosition- and size-related properties of the window.
focus_timestamp: Option<Timestamp>Timestamp when the window was most recently focused.
This timestamp is intended for most-recently-used window switchers, i.e. Alt-Tab. It only updates after some debounce time so that quick window switching doesn’t mark intermediate windows as recently focused.
The timestamp comes from the monotonic clock.