diff --git a/docs/features.md b/docs/features.md index 453be002..e6d881ee 100644 --- a/docs/features.md +++ b/docs/features.md @@ -175,7 +175,7 @@ Jay supports the following wayland protocols: | wp_viewporter | 1 | | | xdg_activation_v1 | 1 | | | xdg_toplevel_drag_manager_v1 | 1 | | -| xdg_wm_base | 6 | | +| xdg_wm_base | 7 | | | xdg_wm_dialog_v1 | 1 | | | zwlr_data_control_manager_v1 | 2 | Yes | | zwlr_layer_shell_v1 | 5 | No[^lsaccess] | diff --git a/release-notes.md b/release-notes.md index a7a470ed..0daeb177 100644 --- a/release-notes.md +++ b/release-notes.md @@ -12,6 +12,7 @@ - Implement color-management-v1. - Implement cursor-shape-v1 version 2. - Outputs can now optionally use the BT.2020/PQ color space. +- Implement ext-shell version 7. # 1.9.1 (2025-02-13) diff --git a/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs b/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs index 3142a882..a3601367 100644 --- a/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs +++ b/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs @@ -67,6 +67,10 @@ const STATE_TILED_RIGHT: u32 = 6; const STATE_TILED_TOP: u32 = 7; const STATE_TILED_BOTTOM: u32 = 8; pub const STATE_SUSPENDED: u32 = 9; +const STATE_CONSTRAINED_LEFT: u32 = 10; +const STATE_CONSTRAINED_RIGHT: u32 = 11; +const STATE_CONSTRAINED_TOP: u32 = 12; +const STATE_CONSTRAINED_BOTTOM: u32 = 13; #[expect(dead_code)] const CAP_WINDOW_MENU: u32 = 1; @@ -78,6 +82,7 @@ const CAP_MINIMIZE: u32 = 4; pub const WM_CAPABILITIES_SINCE: Version = Version(5); pub const SUSPENDED_SINCE: Version = Version(6); +pub const CONSTRAINTS_SINCE: Version = Version(7); #[derive(Copy, Clone, Eq, PartialEq, Debug)] pub enum Decoration { @@ -121,6 +126,12 @@ impl XdgToplevel { states.insert(STATE_TILED_RIGHT); states.insert(STATE_TILED_TOP); states.insert(STATE_TILED_BOTTOM); + if surface.base.version >= CONSTRAINTS_SINCE { + states.insert(STATE_CONSTRAINED_LEFT); + states.insert(STATE_CONSTRAINED_RIGHT); + states.insert(STATE_CONSTRAINED_TOP); + states.insert(STATE_CONSTRAINED_BOTTOM); + } let state = &surface.surface.client.state; Self { id, diff --git a/src/ifs/xdg_wm_base.rs b/src/ifs/xdg_wm_base.rs index 74a05573..0f7cceaf 100644 --- a/src/ifs/xdg_wm_base.rs +++ b/src/ifs/xdg_wm_base.rs @@ -112,7 +112,7 @@ impl Global for XdgWmBaseGlobal { } fn version(&self) -> u32 { - 6 + 7 } }