1
0
Fork 0
forked from wry/wry

wayland: implement xdg-shell v7

This commit is contained in:
Julian Orth 2024-02-29 00:12:37 +01:00
parent ec862648c9
commit 6162483fbf
4 changed files with 14 additions and 2 deletions

View file

@ -175,7 +175,7 @@ Jay supports the following wayland protocols:
| wp_viewporter | 1 | | | wp_viewporter | 1 | |
| xdg_activation_v1 | 1 | | | xdg_activation_v1 | 1 | |
| xdg_toplevel_drag_manager_v1 | 1 | | | xdg_toplevel_drag_manager_v1 | 1 | |
| xdg_wm_base | 6 | | | xdg_wm_base | 7 | |
| xdg_wm_dialog_v1 | 1 | | | xdg_wm_dialog_v1 | 1 | |
| zwlr_data_control_manager_v1 | 2 | Yes | | zwlr_data_control_manager_v1 | 2 | Yes |
| zwlr_layer_shell_v1 | 5 | No[^lsaccess] | | zwlr_layer_shell_v1 | 5 | No[^lsaccess] |

View file

@ -12,6 +12,7 @@
- Implement color-management-v1. - Implement color-management-v1.
- Implement cursor-shape-v1 version 2. - Implement cursor-shape-v1 version 2.
- Outputs can now optionally use the BT.2020/PQ color space. - Outputs can now optionally use the BT.2020/PQ color space.
- Implement ext-shell version 7.
# 1.9.1 (2025-02-13) # 1.9.1 (2025-02-13)

View file

@ -67,6 +67,10 @@ const STATE_TILED_RIGHT: u32 = 6;
const STATE_TILED_TOP: u32 = 7; const STATE_TILED_TOP: u32 = 7;
const STATE_TILED_BOTTOM: u32 = 8; const STATE_TILED_BOTTOM: u32 = 8;
pub const STATE_SUSPENDED: u32 = 9; 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)] #[expect(dead_code)]
const CAP_WINDOW_MENU: u32 = 1; 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 WM_CAPABILITIES_SINCE: Version = Version(5);
pub const SUSPENDED_SINCE: Version = Version(6); pub const SUSPENDED_SINCE: Version = Version(6);
pub const CONSTRAINTS_SINCE: Version = Version(7);
#[derive(Copy, Clone, Eq, PartialEq, Debug)] #[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub enum Decoration { pub enum Decoration {
@ -121,6 +126,12 @@ impl XdgToplevel {
states.insert(STATE_TILED_RIGHT); states.insert(STATE_TILED_RIGHT);
states.insert(STATE_TILED_TOP); states.insert(STATE_TILED_TOP);
states.insert(STATE_TILED_BOTTOM); 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; let state = &surface.surface.client.state;
Self { Self {
id, id,

View file

@ -112,7 +112,7 @@ impl Global for XdgWmBaseGlobal {
} }
fn version(&self) -> u32 { fn version(&self) -> u32 {
6 7
} }
} }