[gnome-control-center/benzea/fix-display-panel-recursion] display: Fix possible recursion when configuration type changes
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/benzea/fix-display-panel-recursion] display: Fix possible recursion when configuration type changes
- Date: Tue, 6 Oct 2020 09:43:22 +0000 (UTC)
commit e695bbf153e49d471ba1baac38ef8b7dc7b5e452
Author: Benjamin Berg <bberg redhat com>
Date: Tue Oct 6 11:38:27 2020 +0200
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
panels/display/cc-display-panel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index dfca98cc6..949034442 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]