1
0
Fork 0
forked from wry/wry

color-management-v1: only expose the protocol with vulkan

This commit is contained in:
Julian Orth 2025-02-26 16:24:22 +01:00
parent 248eb324a5
commit fcd2e3ab33
7 changed files with 40 additions and 2 deletions

View file

@ -201,7 +201,7 @@ impl Global for WpColorManagerV1Global {
}
fn exposed(&self, state: &State) -> bool {
state.color_management_enabled.get()
state.color_management_available()
}
}

View file

@ -23,6 +23,13 @@ impl JayColorManagement {
enabled: self.client.state.color_management_enabled.get() as u32,
});
}
fn send_available(&self) {
self.client.event(Available {
self_id: self.id,
available: self.client.state.color_management_available() as u32,
});
}
}
impl JayColorManagementRequestHandler for JayColorManagement {
@ -35,6 +42,7 @@ impl JayColorManagementRequestHandler for JayColorManagement {
fn get(&self, _req: Get, _slf: &Rc<Self>) -> Result<(), Self::Error> {
self.send_enabled();
self.send_available();
Ok(())
}