diff options
author | Sean Davis <smd.seandavis@gmail.com> | 2018-02-18 09:40:54 -0500 |
---|---|---|
committer | Sean Davis <smd.seandavis@gmail.com> | 2018-02-18 09:40:54 -0500 |
commit | 24f748d0e42ff46e4ba2df6b2fe4dfafc5db4fef (patch) | |
tree | c4334499043c56b97dc08ef21b787631959b7819 | |
parent | f676de1d1a820b4438faaaddf8413ee557dcd51c (diff) | |
download | lightdm-gtk-greeter-git-24f748d0e42ff46e4ba2df6b2fe4dfafc5db4fef.tar.gz |
Add a note so future maintainers (myself included) know what's going on with the timestamp comparison
-rw-r--r-- | src/greeterbackground.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/greeterbackground.c b/src/greeterbackground.c index b76786f..4dd4fa7 100644 --- a/src/greeterbackground.c +++ b/src/greeterbackground.c @@ -735,6 +735,12 @@ greeter_background_set_active_monitor(GreeterBackground* background, if (priv->active_monitor_change_in_progress) return; + /* Prevents infinite signal emmission between two monitors (LP: #1410406, #1509780) + * There are some rare scenarios when using multiple monitors that cause the greeter + * to switch back and forth between the monitors indefinitely. By comparing the + * timestamp at this precision (1/10th of a second), this should no longer be + * possible. + */ timestamp = floor(g_get_monotonic_time () * 0.00001); if (timestamp == priv->active_monitor_change_last_timestamp) return; |