mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
backends: Update inhibited state for the monitor and respect that state
The inhibited state of the monitor was after the initializiation never updated. meta_idle_monitor_reset_idletime didn't respect the inhibited state, so it set timeouts if it shouldn't have. Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/573
This commit is contained in:
parent
658c741420
commit
81ee8886ce
@ -207,6 +207,8 @@ update_inhibited (MetaIdleMonitor *monitor,
|
||||
if (inhibited == monitor->inhibited)
|
||||
return;
|
||||
|
||||
monitor->inhibited = inhibited;
|
||||
|
||||
g_hash_table_foreach (monitor->watches,
|
||||
update_inhibited_watch,
|
||||
monitor);
|
||||
@ -514,6 +516,12 @@ meta_idle_monitor_reset_idletime (MetaIdleMonitor *monitor)
|
||||
{
|
||||
meta_idle_monitor_watch_fire (watch);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (monitor->inhibited)
|
||||
{
|
||||
g_source_set_ready_time (watch->timeout_source, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_source_set_ready_time (watch->timeout_source,
|
||||
@ -521,6 +529,7 @@ meta_idle_monitor_reset_idletime (MetaIdleMonitor *monitor)
|
||||
watch->timeout_msec * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (watch_ids);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user