summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-01 22:49:53 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-01 22:49:53 +0300
commita05d181c72df33256e603f2e4543ee73665b242c (patch)
tree9c88eda1a5054e0098d846c20bb52a70dcfe3569 /src/ui/util.c
parent1e1519b34de372e4ca537cb5fa78df08401ee6b4 (diff)
Fixed premature recycling
Processing events outside event loop lead to recycler being called when a refresh was requested.
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index 785841c9..8a174393 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -195,7 +195,7 @@ iWidget *makeMenu_Widget(iWidget *parent, const iMenuItem *items, size_t n) {
195 195
196void openMenu_Widget(iWidget *d, iInt2 coord) { 196void openMenu_Widget(iWidget *d, iInt2 coord) {
197 /* Menu closes when commands are emitted, so handle any pending ones beforehand. */ 197 /* Menu closes when commands are emitted, so handle any pending ones beforehand. */
198 processEvents_App(postedEventsOnly_AppEventMode); 198// processEvents_App(postedEventsOnly_AppEventMode);
199 setFlags_Widget(d, hidden_WidgetFlag, iFalse); 199 setFlags_Widget(d, hidden_WidgetFlag, iFalse);
200 arrange_Widget(d); 200 arrange_Widget(d);
201 d->rect.pos = coord; 201 d->rect.pos = coord;
@@ -447,7 +447,7 @@ void makeFilePath_Widget(iWidget * parent,
447 const char * acceptLabel, 447 const char * acceptLabel,
448 const char * command) { 448 const char * command) {
449 setFocus_Widget(NULL); 449 setFocus_Widget(NULL);
450 processEvents_App(postedEventsOnly_AppEventMode); 450// processEvents_App(postedEventsOnly_AppEventMode);
451 iWidget *dlg = makeSheet_Widget(command); 451 iWidget *dlg = makeSheet_Widget(command);
452 setCommandHandler_Widget(dlg, filePathHandler_); 452 setCommandHandler_Widget(dlg, filePathHandler_);
453 addChild_Widget(parent, iClob(dlg)); 453 addChild_Widget(parent, iClob(dlg));
@@ -525,7 +525,7 @@ iWidget *makeValueInput_Widget(iWidget *parent, const iString *initialValue, con
525 const char *prompt, const char *acceptLabel, const char *command) { 525 const char *prompt, const char *acceptLabel, const char *command) {
526 if (parent) { 526 if (parent) {
527 setFocus_Widget(NULL); 527 setFocus_Widget(NULL);
528 processEvents_App(postedEventsOnly_AppEventMode); 528// processEvents_App(postedEventsOnly_AppEventMode);
529 } 529 }
530 iWidget *dlg = makeSheet_Widget(command); 530 iWidget *dlg = makeSheet_Widget(command);
531 setCommandHandler_Widget(dlg, valueInputHandler_); 531 setCommandHandler_Widget(dlg, valueInputHandler_);
@@ -583,7 +583,7 @@ iWidget *makeQuestion_Widget(const char *title,
583 const char *labels[], 583 const char *labels[],
584 const char *commands[], 584 const char *commands[],
585 size_t count) { 585 size_t count) {
586 processEvents_App(postedEventsOnly_AppEventMode); 586// processEvents_App(postedEventsOnly_AppEventMode);
587 iWidget *dlg = makeSheet_Widget(""); 587 iWidget *dlg = makeSheet_Widget("");
588 setCommandHandler_Widget(dlg, messageHandler_); 588 setCommandHandler_Widget(dlg, messageHandler_);
589 addChild_Widget(dlg, iClob(new_LabelWidget(title, 0, 0, NULL))); 589 addChild_Widget(dlg, iClob(new_LabelWidget(title, 0, 0, NULL)));