Merge pull request #504 from mahkoh/jorth/head-management-mode
head-management: send mode separately from pos/size changes
This commit is contained in:
commit
ae9fb541f4
2 changed files with 11 additions and 1 deletions
|
|
@ -335,7 +335,6 @@ impl HeadManagers {
|
||||||
let pos = node.global.pos.get();
|
let pos = node.global.pos.get();
|
||||||
state.position = pos.position();
|
state.position = pos.position();
|
||||||
state.size = pos.size();
|
state.size = pos.size();
|
||||||
state.mode = node.global.mode.get();
|
|
||||||
for head in self.managers.lock().values() {
|
for head in self.managers.lock().values() {
|
||||||
skip_in_transaction!(head);
|
skip_in_transaction!(head);
|
||||||
if let Some(ext) = &head.ext.compositor_space_info_v1 {
|
if let Some(ext) = &head.ext.compositor_space_info_v1 {
|
||||||
|
|
@ -343,6 +342,14 @@ impl HeadManagers {
|
||||||
ext.send_size(state);
|
ext.send_size(state);
|
||||||
head.session.schedule_done();
|
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 {
|
if let Some(ext) = &head.ext.mode_info_v1 {
|
||||||
ext.send_mode(state);
|
ext.send_mode(state);
|
||||||
head.session.schedule_done();
|
head.session.schedule_done();
|
||||||
|
|
|
||||||
|
|
@ -466,6 +466,9 @@ impl ConnectorData {
|
||||||
self.head_managers
|
self.head_managers
|
||||||
.handle_colors_change(s.color_space, s.transfer_function);
|
.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())
|
if let Some(output) = state.outputs.get(&self.connector.id())
|
||||||
&& let Some(node) = &output.node
|
&& let Some(node) = &output.node
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue