summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/root.c2
-rw-r--r--src/ui/root.h2
-rw-r--r--src/ui/widget.c3
-rw-r--r--src/ui/window.c2
4 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/root.c b/src/ui/root.c
index a9bc7feb..04586bac 100644
--- a/src/ui/root.c
+++ b/src/ui/root.c
@@ -688,7 +688,7 @@ void updateToolbarColors_Root(iRoot *d) {
688} 688}
689 689
690void notifyVisualOffsetChange_Root(iRoot *d) { 690void notifyVisualOffsetChange_Root(iRoot *d) {
691 if (d && (d->didAnimateVisualOffsets || d->didOverflowScroll)) { 691 if (d && (d->didAnimateVisualOffsets || d->didChangeArrangement)) {
692 iNotifyAudience(d, visualOffsetsChanged, RootVisualOffsetsChanged); 692 iNotifyAudience(d, visualOffsetsChanged, RootVisualOffsetsChanged);
693 } 693 }
694} 694}
diff --git a/src/ui/root.h b/src/ui/root.h
index 2f0d72c9..7e831be3 100644
--- a/src/ui/root.h
+++ b/src/ui/root.h
@@ -19,7 +19,7 @@ struct Impl_Root {
19 iBool pendingArrange; 19 iBool pendingArrange;
20 int loadAnimTimer; 20 int loadAnimTimer;
21 iBool didAnimateVisualOffsets; 21 iBool didAnimateVisualOffsets;
22 iBool didOverflowScroll; 22 iBool didChangeArrangement;
23 iAudience *visualOffsetsChanged; /* called after running tickers */ 23 iAudience *visualOffsetsChanged; /* called after running tickers */
24 iColor tmPalette[tmMax_ColorId]; /* theme-specific palette */ 24 iColor tmPalette[tmMax_ColorId]; /* theme-specific palette */
25}; 25};
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 8cb2cf02..df74a744 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -901,6 +901,7 @@ void arrange_Widget(iWidget *d) {
901 resetArrangement_Widget_(d); /* back to initial default sizes */ 901 resetArrangement_Widget_(d); /* back to initial default sizes */
902 arrange_Widget_(d); 902 arrange_Widget_(d);
903 notifySizeChanged_Widget_(d); 903 notifySizeChanged_Widget_(d);
904 d->root->didChangeArrangement = iTrue;
904 } 905 }
905} 906}
906 907
@@ -1218,7 +1219,7 @@ iBool scrollOverflow_Widget(iWidget *d, int delta) {
1218 } 1219 }
1219// printf("range: %d ... %d\n", range.start, range.end); 1220// printf("range: %d ... %d\n", range.start, range.end);
1220 if (delta) { 1221 if (delta) {
1221 d->root->didOverflowScroll = iTrue; /* ensure that widgets update if needed */ 1222 d->root->didChangeArrangement = iTrue; /* ensure that widgets update if needed */
1222 } 1223 }
1223 } 1224 }
1224 else { 1225 else {
diff --git a/src/ui/window.c b/src/ui/window.c
index 76dd1105..a4929f51 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1265,7 +1265,7 @@ void draw_MainWindow(iMainWindow *d) {
1265 if (root) { 1265 if (root) {
1266 /* Some widgets may need a just-in-time visual update. */ 1266 /* Some widgets may need a just-in-time visual update. */
1267 notifyVisualOffsetChange_Root(root); 1267 notifyVisualOffsetChange_Root(root);
1268 root->didOverflowScroll = iFalse; 1268 root->didChangeArrangement = iFalse;
1269 } 1269 }
1270 } 1270 }
1271 if (isExposed_Window(w)) { 1271 if (isExposed_Window(w)) {