about summary refs log tree commit diff stats
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-07-19 22:48:12 +0100
committerJames Booth <boothj5@gmail.com>2015-07-19 22:48:12 +0100
commit46e2f11b93bb3dfed7b9f5c780961d18cb327b12 (patch)
tree844fb293a8f766336f0c6fe9f4651999d1094cf1 /src/ui/window.c
parentf3326bf105e9acc21aa6e1ee159d5bf02dbe6b16 (diff)
downloadprofani-tty-46e2f11b93bb3dfed7b9f5c780961d18cb327b12.tar.gz
Removed /mouse command
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c47
1 files changed, 0 insertions, 47 deletions
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
@@ -500,53 +500,6 @@ win_resize(ProfWin *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)
 {
     int rows, cols;