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

@ -763,6 +763,10 @@ impl Client {
self.send(&ClientMessage::SetUiDragThreshold { threshold });
}
pub fn set_color_management_enabled(&self, enabled: bool) {
self.send(&ClientMessage::SetColorManagementEnabled { enabled });
}
pub fn connector_connected(&self, connector: Connector) -> bool {
let res = self.send_with_response(&ClientMessage::ConnectorConnected { connector });
get_response!(res, false, ConnectorConnected { connected });

View file

@ -530,6 +530,9 @@ pub enum ClientMessage<'a> {
SetIdleGracePeriod {
period: Duration,
},
SetColorManagementEnabled {
enabled: bool,
},
}
#[derive(Serialize, Deserialize, Debug)]

View file

@ -264,3 +264,12 @@ pub fn set_ui_drag_enabled(enabled: bool) {
pub fn set_ui_drag_threshold(threshold: i32) {
get!().set_ui_drag_threshold(threshold);
}
/// Enables or disables the color-management protocol.
///
/// The default is `false`.
///
/// Affected applications must be restarted for this to take effect.
pub fn set_color_management_enabled(enabled: bool) {
get!().set_color_management_enabled(enabled);
}