SIGWINCH handling in suspended dialogs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
cf6098505c
Коммит
768f48de29
@ -233,6 +233,16 @@ dialog_switch_process_pending (void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
dialog_switch_got_winch (void)
|
||||
{
|
||||
GList *dlg;
|
||||
|
||||
for (dlg = mc_dialogs; dlg != NULL; dlg = g_list_next (dlg))
|
||||
if (dlg != mc_current)
|
||||
((Dlg_head *) dlg->data)->winch_pending = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
dialog_switch_shutdown (void)
|
||||
{
|
||||
|
@ -9,10 +9,10 @@ void dialog_switch_remove (struct Dlg_head *h);
|
||||
|
||||
void dialog_switch_next (void);
|
||||
void dialog_switch_prev (void);
|
||||
|
||||
void dialog_switch_list (void);
|
||||
|
||||
int dialog_switch_process_pending (void);
|
||||
void dialog_switch_got_winch (void);
|
||||
void dialog_switch_shutdown (void);
|
||||
|
||||
#endif /* MC_DIALOG_SWITCH_H */
|
||||
|
@ -651,6 +651,12 @@ update_cursor (Dlg_head * h)
|
||||
void
|
||||
dlg_redraw (Dlg_head * h)
|
||||
{
|
||||
if (h->winch_pending)
|
||||
{
|
||||
h->winch_pending = FALSE;
|
||||
h->callback (h, NULL, DLG_RESIZE, 0, NULL);
|
||||
}
|
||||
|
||||
h->callback (h, NULL, DLG_DRAW, 0, NULL);
|
||||
dlg_broadcast_msg (h, WIDGET_DRAW, TRUE);
|
||||
update_cursor (h);
|
||||
|
@ -152,6 +152,7 @@ struct Dlg_head
|
||||
/* Internal flags */
|
||||
dlg_state_t state;
|
||||
gboolean fullscreen; /* Parents dialogs don't need refresh */
|
||||
gboolean winch_pending; /* SIGWINCH signal has been got. Resize dialog after rise */
|
||||
int mouse_status; /* For the autorepeat status of the mouse */
|
||||
|
||||
/* Internal variables */
|
||||
|
@ -55,6 +55,7 @@
|
||||
#include "lib/strutil.h"
|
||||
|
||||
#include "dialog.h"
|
||||
#include "dialog-switch.h" /* dialog_switch_got_winch() */
|
||||
#include "widget.h"
|
||||
#include "command.h"
|
||||
#include "main-widgets.h"
|
||||
@ -778,6 +779,8 @@ change_screen_size (void)
|
||||
tty_nodelay (FALSE);
|
||||
#endif
|
||||
|
||||
/* Inform all suspending dialogs */
|
||||
dialog_switch_got_winch ();
|
||||
/* Inform all running dialogs */
|
||||
g_list_foreach (top_dlg, (GFunc) dlg_resize_cb, NULL);
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user