color-management-v1: only expose the protocol with vulkan
This commit is contained in:
parent
248eb324a5
commit
fcd2e3ab33
7 changed files with 40 additions and 2 deletions
|
|
@ -201,7 +201,7 @@ impl Global for WpColorManagerV1Global {
|
|||
}
|
||||
|
||||
fn exposed(&self, state: &State) -> bool {
|
||||
state.color_management_enabled.get()
|
||||
state.color_management_available()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue