1
0
Fork 0
forked from wry/wry

Merge pull request #504 from mahkoh/jorth/head-management-mode

head-management: send mode separately from pos/size changes
This commit is contained in:
mahkoh 2025-07-16 15:34:03 +02:00 committed by GitHub
commit ae9fb541f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -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();

View file

@ -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
{