mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Fix of terminal resize handling
...and fix of <sys/ioctl.h> includes and includes cleanup in src/filemanager/layout.c. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
291abae262
commit
47115e97ad
@ -26,6 +26,13 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* If TIOCGWINSZ supported, make it available here, because window resizing code
|
||||
* depends on it... */
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <termios.h>
|
||||
|
||||
#include "lib/global.h"
|
||||
#include "lib/tty/tty.h" /* LINES, COLS */
|
||||
#include "lib/tty/win.h" /* do_enter_ca_mode() */
|
||||
@ -94,6 +101,7 @@ dialog_switch_goto (GList * dlg)
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
#if defined TIOCGWINSZ
|
||||
static void
|
||||
dlg_resize_cb (void *data, void *user_data)
|
||||
{
|
||||
@ -102,6 +110,7 @@ dlg_resize_cb (void *data, void *user_data)
|
||||
(void) user_data;
|
||||
d->callback (d, NULL, DLG_RESIZE, 0, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/*** public functions ****************************************************************************/
|
||||
|
@ -55,7 +55,9 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
@ -26,22 +26,10 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/*
|
||||
* If TIOCGWINSZ supported, make it available here, because window-
|
||||
* resizing code depends on it...
|
||||
*/
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "lib/global.h"
|
||||
@ -49,7 +37,6 @@
|
||||
#include "lib/skin.h"
|
||||
#include "lib/tty/key.h"
|
||||
#include "lib/tty/mouse.h"
|
||||
#include "lib/tty/win.h" /* do_enter_ca_mode() */
|
||||
#include "lib/mcconfig.h"
|
||||
#include "lib/vfs/vfs.h" /* For vfs_translate_url() */
|
||||
#include "lib/strutil.h"
|
||||
|
Loading…
Reference in New Issue
Block a user