head-management: send mode separately from pos/size changes
This commit is contained in:
parent
2c116e2a16
commit
18f9742d2c
2 changed files with 11 additions and 1 deletions
|
|
@ -335,7 +335,6 @@ impl HeadManagers {
|
|||
let pos = node.global.pos.get();
|
||||
state.position = pos.position();
|
||||
state.size = pos.size();
|
||||
state.mode = node.global.mode.get();
|
||||
for head in self.managers.lock().values() {
|
||||
skip_in_transaction!(head);
|
||||
if let Some(ext) = &head.ext.compositor_space_info_v1 {
|
||||
|
|
@ -343,6 +342,14 @@ impl HeadManagers {
|
|||
ext.send_size(state);
|
||||
head.session.schedule_done();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn handle_mode_change(&self, mode: Mode) {
|
||||
let state = &mut *self.state.borrow_mut();
|
||||
state.mode = mode;
|
||||
for head in self.managers.lock().values() {
|
||||
skip_in_transaction!(head);
|
||||
if let Some(ext) = &head.ext.mode_info_v1 {
|
||||
ext.send_mode(state);
|
||||
head.session.schedule_done();
|
||||
|
|
|
|||
|
|
@ -466,6 +466,9 @@ impl ConnectorData {
|
|||
self.head_managers
|
||||
.handle_colors_change(s.color_space, s.transfer_function);
|
||||
}
|
||||
if old.mode != s.mode {
|
||||
self.head_managers.handle_mode_change(s.mode);
|
||||
}
|
||||
if let Some(output) = state.outputs.get(&self.connector.id())
|
||||
&& let Some(node) = &output.node
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue