From 0ae851aa39de5dfdf6b97c3e774aa322c820f410 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 3 Oct 2008 14:28:43 +0200 Subject: [PATCH] removed KEY_RESIZE Since we are handling SIGWINCH, we do not need to handle KEY_RESIZE from ncurses. Remove it. --- src/command.c | 4 ---- src/screen_file.c | 2 -- src/screen_keydef.c | 3 --- src/wreadln.c | 22 ---------------------- 4 files changed, 31 deletions(-) diff --git a/src/command.c b/src/command.c index af188d1..b107ba3 100644 --- a/src/command.c +++ b/src/command.c @@ -398,10 +398,6 @@ my_wgetch(WINDOW *w) c = wgetch(w); - /* handle resize event */ - if (c == KEY_RESIZE) - screen_resize(); - #ifdef ENABLE_RAW_MODE /* handle SIGSTOP (Ctrl-Z) */ if (c == 26 || c == 407) diff --git a/src/screen_file.c b/src/screen_file.c index 1ba9640..3029165 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -125,8 +125,6 @@ handle_delete(screen_t *screen, mpdclient_t *c) g_free(str); key = tolower(screen_getch(screen->status_window.w, buf)); g_free(buf); - if( key==KEY_RESIZE ) - screen_resize(); if( key != YES[0] ) { screen_status_printf(_("Aborted!")); return 0; diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 6e9cb9a..268bc48 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -160,9 +160,6 @@ assign_new_key(WINDOW *w, int cmd_index, int key_index) key = screen_getch(w, buf); g_free(buf); - if (key == KEY_RESIZE) - screen_resize(); - if (key==ERR) { screen_status_printf(_("Aborted!")); return; diff --git a/src/wreadln.c b/src/wreadln.c index e52d1fd..bf31d1d 100644 --- a/src/wreadln.c +++ b/src/wreadln.c @@ -208,17 +208,6 @@ _wreadln(WINDOW *w, case ERR: /* ingnore errors */ break; - case KEY_RESIZE: - /* a resize event */ - if( x1>COLS ) { - x1=COLS; - width = x1-x0; - cursor_move_to_eol(&cursor, &start, width, x0, x1, line); - } - /* make shure the cursor is visible */ - curs_set(1); - break; - case TAB: if( gcmp ) { char *prefix = NULL; @@ -614,17 +603,6 @@ _wreadln(WINDOW *w, } cursor_move_to_eol(&cursor, &start, width, x0, x1, wline); break; - case KEY_RESIZE: - /* resize event */ - if( x1>COLS ) - { - x1=COLS; - width = x1-x0; - cursor_move_to_eol(&cursor, &start, width, x0, x1, wline); - } - /* make shure the cursor is visible */ - curs_set(1); - break; } } -- 2.30.2