summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libdialog/checklist.c8
-rw-r--r--gnu/lib/libdialog/menubox.c2
-rw-r--r--gnu/lib/libdialog/radiolist.c15
3 files changed, 9 insertions, 16 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c
index 55d5138..7714d38 100644
--- a/gnu/lib/libdialog/checklist.c
+++ b/gnu/lib/libdialog/checklist.c
@@ -316,6 +316,10 @@ draw:
save = dupwin(newscr);
st = ditems[scroll + choice].fire(&ditems[scroll + choice]);
+ if (st & DITEM_RESTORE) {
+ touchwin(save);
+ wrefresh(save);
+ }
if (st & DITEM_REDRAW) {
wmove(dialog, cur_y, cur_x); /* Restore cursor to previous position */
for (i = 0; i < item_no; i++)
@@ -329,10 +333,6 @@ draw:
cur_x, cur_y);
wrefresh(dialog);
}
- else if (st & DITEM_RESTORE) {
- touchwin(save);
- wrefresh(save);
- }
else if (st & DITEM_RECREATE) {
delwin(save);
delwin(list);
diff --git a/gnu/lib/libdialog/menubox.c b/gnu/lib/libdialog/menubox.c
index 9e36601..fde4fc6 100644
--- a/gnu/lib/libdialog/menubox.c
+++ b/gnu/lib/libdialog/menubox.c
@@ -389,7 +389,7 @@ draw:
touchwin(save);
wrefresh(save);
}
- else if (status & DITEM_RECREATE) {
+ if (status & DITEM_RECREATE) {
delwin(menu);
delwin(dialog);
delwin(save);
diff --git a/gnu/lib/libdialog/radiolist.c b/gnu/lib/libdialog/radiolist.c
index 7ec5a72..0361fe2 100644
--- a/gnu/lib/libdialog/radiolist.c
+++ b/gnu/lib/libdialog/radiolist.c
@@ -321,6 +321,10 @@ draw:
save = dupwin(newscr);
st = ditems[scroll + choice].fire(&ditems[scroll + choice]);
+ if (st & DITEM_RESTORE) {
+ touchwin(save);
+ wrefresh(save);
+ }
if (st & DITEM_REDRAW) {
for (i = 0; i < item_no; i++)
status[i] = ditems[i].checked ? ditems[i].checked(&ditems[i]) : FALSE;
@@ -334,11 +338,6 @@ draw:
wmove(dialog, cur_y, cur_x); /* Restore cursor to previous position */
wrefresh(dialog);
}
- else if (st & DITEM_RESTORE) {
- touchwin(save);
- wrefresh(save);
- wmove(dialog, cur_y, cur_x);
- }
else if (st & DITEM_RECREATE) {
delwin(save);
delwin(list);
@@ -465,12 +464,6 @@ draw:
touchwin(save);
wrefresh(save);
}
- else if (st & DITEM_RECREATE) {
- delwin(save);
- delwin(list);
- delwin(dialog);
- goto draw;
- }
delwin(save);
}
else {
OpenPOWER on IntegriCloud