Skip to content

Commit 9d36dbd

Browse files
committed
Fix the loop bug for good
1 parent 16a735d commit 9d36dbd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/greeterbackground.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,11 +741,14 @@ greeter_background_set_active_monitor(GreeterBackground* background,
741741
* timestamp at this precision (1/10th of a second), this should no longer be
742742
* possible.
743743
*/
744-
if (!active)
744+
if (active != NULL)
745745
{
746746
timestamp = floor(g_get_monotonic_time () * 0.00001);
747747
if (timestamp == priv->active_monitor_change_last_timestamp)
748+
{
749+
g_debug("[Background] Preventing infinite monitor loop");
748750
return;
751+
}
749752
}
750753

751754
priv->active_monitor_change_in_progress = TRUE;

0 commit comments

Comments
 (0)