1
1

(input_update): don't do anything if widget is unowned or is in inactive dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
Andrew Borodin 2013-09-21 15:04:05 +04:00
родитель d8bb31c665
Коммит e16e33a186

Просмотреть файл

@ -1258,13 +1258,21 @@ input_update (WInput * in, gboolean clear_first)
const char *cp;
int pw;
if (should_show_history_button (in))
has_history = HISTORY_BUTTON_WIDTH;
if (in->disable_update != 0)
return;
/* don't draw widget not put into dialog */
if (w->owner == NULL || w->owner->state != DLG_ACTIVE)
return;
if (should_show_history_button (in))
has_history = HISTORY_BUTTON_WIDTH;
buf_len = str_length (in->buffer);
/* Adjust the mark */
in->mark = min (in->mark, buf_len);
pw = str_term_width2 (in->buffer, in->point);
/* Make the point visible */
@ -1275,13 +1283,6 @@ input_update (WInput * in, gboolean clear_first)
in->term_first_shown = 0;
}
/* Adjust the mark */
in->mark = min (in->mark, buf_len);
/* don't draw widget not put into dialog */
if (w->owner == NULL || w->owner->state != DLG_ACTIVE)
return;
if (has_history != 0)
draw_history_button (in);