Skip to content

Commit

Permalink
add scratchpad_state to Node
Browse files Browse the repository at this point in the history
  • Loading branch information
JayceFayne committed Feb 29, 2024
1 parent 514ede2 commit 2ef86da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 12 additions & 1 deletion types/src/reply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,14 @@ pub enum Floating {
UserOff,
}

#[non_exhaustive]
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum ScratchpadState {
Fresh,
None,
}

#[non_exhaustive]
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct Node {
Expand Down Expand Up @@ -376,9 +384,12 @@ pub struct Node {
/// that can be used as an aid in submitting reproduction steps for bug
/// reports.
pub representation: Option<String>,
/// (Only containers and views) The fullscreen mode of the node. 0 means
/// (Only views) The fullscreen mode of the node. 0 means
/// none, 1 means full workspace, and 2 means global fullscreen.
pub fullscreen_mode: Option<u8>,
/// (Only views) For an xdg-shell and xwayland view, whether the window is in the scratchpad.
/// Otherwise, null.
pub scratchpad_state: Option<ScratchpadState>,
/// (Only views) For an xdg-shell view, the name of the application, if set.
/// Otherwise, null.
pub app_id: Option<String>,
Expand Down
2 changes: 2 additions & 0 deletions types/src/utils/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ mod tests {
sticky: false,
representation: None,
fullscreen_mode: None,
floating: None,
scratchpad_state: None,
app_id: None,
pid: None,
window: None,
Expand Down

0 comments on commit 2ef86da

Please sign in to comment.