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)
|
if (inhibited == monitor->inhibited)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
monitor->inhibited = inhibited;
|
||||||
|
|
||||||
g_hash_table_foreach (monitor->watches,
|
g_hash_table_foreach (monitor->watches,
|
||||||
update_inhibited_watch,
|
update_inhibited_watch,
|
||||||
monitor);
|
monitor);
|
||||||
@ -516,9 +518,16 @@ meta_idle_monitor_reset_idletime (MetaIdleMonitor *monitor)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_source_set_ready_time (watch->timeout_source,
|
if (monitor->inhibited)
|
||||||
monitor->last_event_time +
|
{
|
||||||
watch->timeout_msec * 1000);
|
g_source_set_ready_time (watch->timeout_source, -1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_source_set_ready_time (watch->timeout_source,
|
||||||
|
monitor->last_event_time +
|
||||||
|
watch->timeout_msec * 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user