Skip to content

Commit

Permalink
xdg: Add a getter to read pending_configures
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR authored and Drakulix committed Dec 23, 2024
1 parent 0053864 commit 2eddf12
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/wayland/shell/xdg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,14 @@ macro_rules! xdg_role {
pub fn has_pending_changes(&self) -> bool {
self.server_pending.as_ref().map(|s| s != self.current_server_state()).unwrap_or(false)
}

/// Returns a list of configures sent to, but not yet acknowledged by the client.
///
/// The list is ordered by age, so the last configure in the list is the last one sent
/// to the client.
pub fn pending_configures(&self) -> &[$configure_name] {
&self.pending_configures
}
}

impl Default for $attributes_name {
Expand Down

0 comments on commit 2eddf12

Please sign in to comment.