Code

removed KEY_RESIZE
authorMax Kellermann <max@duempel.org>
Fri, 3 Oct 2008 12:28:43 +0000 (14:28 +0200)
committerMax Kellermann <max@duempel.org>
Fri, 3 Oct 2008 12:28:43 +0000 (14:28 +0200)
Since we are handling SIGWINCH, we do not need to handle KEY_RESIZE
from ncurses.  Remove it.

src/command.c
src/screen_file.c
src/screen_keydef.c
src/wreadln.c

index af188d19ab0521670702b0c86694eb050b59fc3d..b107ba3f08b388c3da26381eab9232a139270878 100644 (file)
@@ -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)
index 1ba96403a8ab3ac4e8b1f921834e985c13a3484e..3029165f2ade045a82c932805b570452f1befa0d 100644 (file)
@@ -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;
index 6e9cb9a25ecde8288bf96df3b4287efb123f6e98..268bc48d9ab3cd8f72a4cdaa637d7e91f4e87308 100644 (file)
@@ -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;
index e52d1fd04c83290f9a631127f18b0a95965db8ca..bf31d1db349edbaadb6114f7400b8d8c1c7e2b87 100644 (file)
@@ -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;
            }
 
        }