1
0
Fork 0

core: Add debug control setting for session management

We will at the moment want it guarded behind a setting.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
This commit is contained in:
Carlos Garnacho 2024-08-30 19:25:36 +02:00 committed by Marge Bot
parent 5c30483739
commit 2074e4e146
3 changed files with 18 additions and 0 deletions

View file

@ -9,6 +9,7 @@
<property name="EnableHDR" type="b" access="readwrite" />
<property name="ForceLinearBlending" type="b" access="readwrite" />
<property name="LuminancePercentage" type="u" access="readwrite" />
<property name="SessionManagementProtocol" type="b" access="readwrite" />
</interface>

View file

@ -27,3 +27,5 @@ gboolean meta_debug_control_is_linear_blending_forced (MetaDebugControl *debug_c
gboolean meta_debug_control_is_hdr_enabled (MetaDebugControl *debug_control);
unsigned int meta_debug_control_get_luminance_percentage (MetaDebugControl *debug_control);
gboolean meta_debug_control_is_session_management_protocol_enabled (MetaDebugControl *debug_control);

View file

@ -169,6 +169,7 @@ meta_debug_control_init (MetaDebugControl *debug_control)
MetaDBusDebugControl *dbus_debug_control =
META_DBUS_DEBUG_CONTROL (debug_control);
gboolean enable_hdr, force_linear_blending, color_management_protocol;
gboolean session_management_protocol;
color_management_protocol =
g_strcmp0 (getenv ("MUTTER_DEBUG_COLOR_MANAGEMENT_PROTOCOL"), "1") == 0;
@ -184,6 +185,11 @@ meta_debug_control_init (MetaDebugControl *debug_control)
force_linear_blending);
meta_dbus_debug_control_set_luminance_percentage (dbus_debug_control, 100);
session_management_protocol =
g_strcmp0 (getenv ("MUTTER_DEBUG_SESSION_MANAGEMENT_PROTOCOL"), "1") == 0;
meta_dbus_debug_control_set_session_management_protocol (dbus_debug_control,
session_management_protocol);
}
gboolean
@ -222,6 +228,15 @@ meta_debug_control_get_luminance_percentage (MetaDebugControl *debug_control)
return meta_dbus_debug_control_get_luminance_percentage (dbus_debug_control);
}
gboolean
meta_debug_control_is_session_management_protocol_enabled (MetaDebugControl *debug_control)
{
MetaDBusDebugControl *dbus_debug_control =
META_DBUS_DEBUG_CONTROL (debug_control);
return meta_dbus_debug_control_get_session_management_protocol (dbus_debug_control);
}
void
meta_debug_control_set_exported (MetaDebugControl *debug_control,
gboolean exported)