From b65c60d2419095c2010b6aeea16887967d7c9a8c Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 14 Dec 2021 16:45:31 +0200 Subject: Root: More efficient input size updates Input widgets may resize themselves, and Preferences sends a ton of these notifications. Only rearrange a single time afterwards, not individually after each notification. --- src/ui/root.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/ui/root.c') diff --git a/src/ui/root.c b/src/ui/root.c index 1295371d..a9bc7feb 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -538,6 +538,14 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) { #endif return iFalse; } + else if (equal_Command(cmd, "root.arrange")) { + iWidget *prefs = findWidget_Root("prefs"); + if (prefs) { + updatePreferencesLayout_Widget(prefs); + } + root->root->pendingArrange = iFalse; + return iTrue; + } else if (handleCommand_App(cmd)) { return iTrue; } -- cgit v1.2.3