Move winch_pending member from WDialog to WGroup.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2016-09-27 14:08:42 +03:00
parent e4e0070db5
commit d575c7058b
4 changed files with 8 additions and 5 deletions

View File

@ -119,7 +119,7 @@ dialog_switch_resize (WDialog * d)
if (widget_get_state (WIDGET (d), WST_ACTIVE))
send_message (d, NULL, MSG_RESIZE, 0, NULL);
else
d->winch_pending = TRUE;
GROUP (d)->winch_pending = TRUE;
}
/* --------------------------------------------------------------------------------------------- */
@ -293,7 +293,7 @@ dialog_switch_got_winch (void)
for (dlg = mc_dialogs; dlg != NULL; dlg = g_list_next (dlg))
if (dlg != mc_current)
DIALOG (dlg->data)->winch_pending = TRUE;
GROUP (dlg->data)->winch_pending = TRUE;
}
/* --------------------------------------------------------------------------------------------- */

View File

@ -1068,12 +1068,14 @@ update_cursor (WDialog * h)
void
dlg_draw (WDialog * h)
{
WGroup *g = GROUP (h);
if (!widget_get_state (WIDGET (h), WST_ACTIVE))
return;
if (h->winch_pending)
if (g->winch_pending)
{
h->winch_pending = FALSE;
g->winch_pending = FALSE;
send_message (h, NULL, MSG_RESIZE, 0, NULL);
}

View File

@ -72,7 +72,6 @@ struct WDialog
int ret_value; /* Result of dlg_run() */
/* Internal flags */
gboolean winch_pending; /* SIGWINCH signal has been got. Resize dialog after rise */
int mouse_status; /* For the autorepeat status of the mouse */
/* Internal variables */

View File

@ -29,6 +29,8 @@ struct WGroup
/* Group members */
GList *widgets; /* widgets list */
GList *current; /* Currently active widget */
gboolean winch_pending; /* SIGWINCH signal has been got. Resize group after rise */
};
/*** global variables defined in .c file *********************************************************/