From 46e2f11b93bb3dfed7b9f5c780961d18cb327b12 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 19 Jul 2015 22:48:12 +0100 Subject: Removed /mouse command --- src/ui/window.c | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'src/ui/window.c') diff --git a/src/ui/window.c b/src/ui/window.c index c008e44d..6c76b5f8 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -499,53 +499,6 @@ win_resize(ProfWin *window) win_redraw(window); } -void -win_mouse(ProfWin *window, const wint_t ch, const int result) -{ - int rows = getmaxy(stdscr); - int y = getcury(window->layout->win); - - int page_space = rows - 4; - int *page_start = &(window->layout->y_pos); - - if (prefs_get_boolean(PREF_MOUSE)) { - MEVENT mouse_event; - - if (ch == KEY_MOUSE) { - if (getmouse(&mouse_event) == OK) { - -#ifdef PLATFORM_CYGWIN - if (mouse_event.bstate & BUTTON5_PRESSED) { // mouse wheel down -#else - if (mouse_event.bstate & BUTTON2_PRESSED) { // mouse wheel down -#endif - *page_start += 4; - - // only got half a screen, show full screen - if ((y - (*page_start)) < page_space) - *page_start = y - page_space; - - // went past end, show full screen - else if (*page_start >= y) - *page_start = y - page_space; - - window->layout->paged = 1; - win_update_virtual(window); - } else if (mouse_event.bstate & BUTTON4_PRESSED) { // mouse wheel up - *page_start -= 4; - - // went past beginning, show first page - if (*page_start < 0) - *page_start = 0; - - window->layout->paged = 1; - win_update_virtual(window); - } - } - } - } -} - void win_update_virtual(ProfWin *window) { -- cgit 1.4.1-2-gfad0