monitor-manager: Notify privacy screen changes on hotkey press
When privacy screen is changed and this happens on explicit user request (that is not a setting change) we should notify about this via an OSD. To perform this, we keep track of the reason that lead to a privacy screen change, and when we record it we try to notify the user about. When the hardware has not an explicit hotkey signal but we record a change we must still fallback to this case. Fixes: #2105 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1952>
This commit is contained in:

committed by
Marge Bot

parent
4e10324a80
commit
8cf3485ab0
@ -478,6 +478,18 @@ meta_settings_is_privacy_screen_enabled (MetaSettings *settings)
|
||||
return settings->privacy_screen;
|
||||
}
|
||||
|
||||
void
|
||||
meta_settings_set_privacy_screen_enabled (MetaSettings *settings,
|
||||
gboolean enabled)
|
||||
{
|
||||
if (settings->privacy_screen == enabled)
|
||||
return;
|
||||
|
||||
settings->privacy_screen = enabled;
|
||||
g_settings_set_boolean (settings->privacy_settings, "privacy-screen",
|
||||
enabled);
|
||||
}
|
||||
|
||||
MetaSettings *
|
||||
meta_settings_new (MetaBackend *backend)
|
||||
{
|
||||
|
Reference in New Issue
Block a user