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,
}
Expand description
Toplevel window.
Fields§
§id: u64
Unique 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: bool
Whether 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: bool
Whether this window is currently floating.
If the window isn’t floating then it is in the tiling layout.