head-management: add mode-setter-v1 extension
This commit is contained in:
parent
c25ddc8b5b
commit
7e69a80dbc
7 changed files with 128 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue