aboutsummaryrefslogtreecommitdiffstats
path: root/screen_file.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-04-21 19:06:18 +0000
committerKalle Wallin <kaw@linux.se>2004-04-21 19:06:18 +0000
commitb1f77e2684e85fac5ef5d50fc1342d7d53e5a492 (patch)
tree7727ec3010c4368f59b19a3e246f8d62cc8944d5 /screen_file.c
parent41d5f057a8e0fa8ed4a0c8465ce8a1d0e7ab8e1a (diff)
downloadmpd-b1f77e2684e85fac5ef5d50fc1342d7d53e5a492.tar.gz
mpd-b1f77e2684e85fac5ef5d50fc1342d7d53e5a492.tar.xz
mpd-b1f77e2684e85fac5ef5d50fc1342d7d53e5a492.zip
Fixed resize handling (SIGWINCH).
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@871 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'screen_file.c')
-rw-r--r--screen_file.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/screen_file.c b/screen_file.c
index a0b9ee3f7..e57fc317f 100644
--- a/screen_file.c
+++ b/screen_file.c
@@ -178,6 +178,8 @@ handle_delete(screen_t *screen, mpd_client_t *c)
snprintf(buf, BUFSIZE, "Delete playlist %s [y/n] ? ", str);
g_free(str);
key = tolower(screen_getch(screen->status_window.w, buf));
+ if( key==KEY_RESIZE )
+ screen_resize();
if( key!='y' )
{
screen_status_printf("Aborted!");
@@ -331,6 +333,13 @@ file_init(WINDOW *w, int cols, int rows)
}
static void
+file_resize(int cols, int rows)
+{
+ lw->cols = cols;
+ lw->rows = rows;
+}
+
+static void
file_exit(void)
{
list_window_free(lw);
@@ -484,6 +493,7 @@ get_screen_file(void)
functions.exit = file_exit;
functions.open = file_open;
functions.close = file_close;
+ functions.resize = file_resize;
functions.paint = file_paint;
functions.update = file_update;
functions.cmd = file_cmd;