From 255cc340b5af00ba2af48fdd80df042dfc4ca189 Mon Sep 17 00:00:00 2001 From: Egmont Koblinger Date: Fri, 15 Nov 2013 13:24:34 +0400 Subject: [PATCH] Clarify usage of MSG_IDLE in mcedit. Signed-off-by: Andrew Borodin --- src/editor/editwidget.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index 71e227778..9fb13577f 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -1091,8 +1091,7 @@ edit_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, v case MSG_IDLE: widget_want_idle (w, FALSE); - edit_update_screen ((WEdit *) h->current->data); - return MSG_HANDLED; + return send_message (h->current->data, NULL, MSG_IDLE, 0, NULL); default: return dlg_default_callback (w, sender, msg, parm, data); @@ -1161,6 +1160,10 @@ edit_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *da return MSG_HANDLED; } + case MSG_IDLE: + edit_update_screen (e); + return MSG_HANDLED; + case MSG_DESTROY: edit_clean (e); return MSG_HANDLED;