1
0
Fork 0
forked from wry/wry

config: allow disabling color-management

This commit is contained in:
Julian Orth 2025-02-26 16:16:38 +01:00
parent c66f5798b7
commit 248eb324a5
24 changed files with 388 additions and 9 deletions

View file

@ -135,6 +135,10 @@ pub trait Global: GlobalBase {
fn xwayland_only(&self) -> bool {
false
}
fn exposed(&self, state: &State) -> bool {
let _ = state;
true
}
}
pub struct Globals {
@ -297,7 +301,8 @@ impl Globals {
($singleton:expr) => {
for global in globals.values() {
if global.singleton() == $singleton {
if caps.contains(global.required_caps())
if global.exposed(&registry.client.state)
&& caps.contains(global.required_caps())
&& (xwayland || !global.xwayland_only())
{
registry.send_global(global);