From 9d36dbd9cac635cd3bfe7c6c5ca117478a703488 Mon Sep 17 00:00:00 2001 From: Sean Davis Date: Tue, 20 Feb 2018 05:12:05 -0500 Subject: Fix the loop bug for good --- src/greeterbackground.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/greeterbackground.c b/src/greeterbackground.c index 854edd3..663c859 100644 --- a/src/greeterbackground.c +++ b/src/greeterbackground.c @@ -741,11 +741,14 @@ greeter_background_set_active_monitor(GreeterBackground* background, * timestamp at this precision (1/10th of a second), this should no longer be * possible. */ - if (!active) + if (active != NULL) { timestamp = floor(g_get_monotonic_time () * 0.00001); if (timestamp == priv->active_monitor_change_last_timestamp) + { + g_debug("[Background] Preventing infinite monitor loop"); return; + } } priv->active_monitor_change_in_progress = TRUE; -- cgit v1.2.1