summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Davis <smd.seandavis@gmail.com>2018-02-20 05:12:05 -0500
committerSean Davis <smd.seandavis@gmail.com>2018-02-20 05:12:05 -0500
commit9d36dbd9cac635cd3bfe7c6c5ca117478a703488 (patch)
tree114532f7d21d5504e7438f841f448a0c30a5767e /src
parent16a735d15adb7ad2aea7d5bf295d398d074e8e7f (diff)
downloadlightdm-gtk-greeter-git-9d36dbd9cac635cd3bfe7c6c5ca117478a703488.tar.gz
Fix the loop bug for good
Diffstat (limited to 'src')
-rw-r--r--src/greeterbackground.c5
1 files changed, 4 insertions, 1 deletions
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;