1
0
Fork 0
forked from wry/wry

head-management: add mode-setter-v1 extension

This commit is contained in:
Julian Orth 2025-07-12 09:33:44 +02:00
parent c25ddc8b5b
commit 7e69a80dbc
7 changed files with 128 additions and 0 deletions

View file

@ -264,6 +264,7 @@ impl JayHeadManagerSessionV1 {
let old = connector.state.get();
let mut new = old;
new.enabled = desired.connector_enabled;
new.mode = desired.mode;
if old == new {
continue;
}
@ -414,6 +415,12 @@ impl JayHeadManagerSessionV1RequestHandler for JayHeadManagerSessionV1 {
to_send |= COMPOSITOR_SPACE_INFO_SCALE;
to_send |= COMPOSITOR_SPACE_INFO_SIZE;
}
HeadOp::SetMode(i) => {
state.mode = snapshot.monitor_info.as_deref().unwrap().modes[i];
state.update_size();
to_send |= MODE_INFO;
to_send |= COMPOSITOR_SPACE_INFO_SIZE;
}
}
}
if to_send.contains(CORE_INFO)