display: Fix possible recursion when configuration type changes

The UI rebuilding code may change the configuration type, which in turn
can trigger a UI rebuild. This should not be done if we are already
updating the UI (but must be done otherwise, as that means the user has
chosen to change the configuration).

Fixes: #1141
This commit is contained in:
Benjamin Berg 2020-10-06 11:38:27 +02:00 committed by Robert Ancell
parent 35f3eb9b22
commit 66c81d8128

View file

@ -254,7 +254,8 @@ config_ensure_of_type (CcDisplayPanel *panel, CcDisplayConfigType type)
g_assert_not_reached ();
}
rebuild_ui (panel);
if (!panel->rebuilding_counter)
rebuild_ui (panel);
}
static void