diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-14 16:45:31 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-14 16:45:31 +0200 |
commit | b65c60d2419095c2010b6aeea16887967d7c9a8c (patch) | |
tree | 4372f21c23b7c3d18be862d647f343467fa67aaf /src/ui | |
parent | 282acaeadd5a9c003b0ce6a55fceb61e915ad43d (diff) |
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.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/root.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) { | |||
538 | #endif | 538 | #endif |
539 | return iFalse; | 539 | return iFalse; |
540 | } | 540 | } |
541 | else if (equal_Command(cmd, "root.arrange")) { | ||
542 | iWidget *prefs = findWidget_Root("prefs"); | ||
543 | if (prefs) { | ||
544 | updatePreferencesLayout_Widget(prefs); | ||
545 | } | ||
546 | root->root->pendingArrange = iFalse; | ||
547 | return iTrue; | ||
548 | } | ||
541 | else if (handleCommand_App(cmd)) { | 549 | else if (handleCommand_App(cmd)) { |
542 | return iTrue; | 550 | return iTrue; |
543 | } | 551 | } |