about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/console.c10
-rw-r--r--src/ui/core.c4
-rw-r--r--src/ui/inputwin.c2
-rw-r--r--src/ui/ui.h1
-rw-r--r--src/ui/window.c47
-rw-r--r--src/ui/window.h1
6 files changed, 1 insertions, 64 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index ceb02e08..e07ba518 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -982,15 +982,6 @@ cons_vercheck_setting(void)
 }
 
 void
-cons_mouse_setting(void)
-{
-    if (prefs_get_boolean(PREF_MOUSE))
-        cons_show("Mouse handling (/mouse)       : ON");
-    else
-        cons_show("Mouse handling (/mouse)       : OFF");
-}
-
-void
 cons_statuses_setting(void)
 {
     char *console = prefs_get_string(PREF_STATUSES_CONSOLE);
@@ -1066,7 +1057,6 @@ cons_show_ui_prefs(void)
     cons_time_setting();
     cons_resource_setting();
     cons_vercheck_setting();
-    cons_mouse_setting();
     cons_statuses_setting();
     cons_occupants_setting();
     cons_roster_setting();
diff --git a/src/ui/core.c b/src/ui/core.c
index fa419e45..5f85a3cd 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -101,10 +101,6 @@ ui_init(void)
     cbreak();
     noecho();
     keypad(stdscr, TRUE);
-    if (prefs_get_boolean(PREF_MOUSE)) {
-        mousemask(ALL_MOUSE_EVENTS, NULL);
-        mouseinterval(5);
-    }
     ui_load_colours();
     refresh();
     create_title_bar();
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c
index 1ea46984..cb4d7a7e 100644
--- a/src/ui/inputwin.c
+++ b/src/ui/inputwin.c
@@ -286,7 +286,7 @@ _inp_printable(const wint_t ch)
     bytes[utf_len] = '\0';
     gunichar unichar = g_utf8_get_char(bytes);
 
-    return g_unichar_isprint(unichar) && (ch != KEY_MOUSE);
+    return g_unichar_isprint(unichar);
 }
 
 static int
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 7682f57b..637c8f75 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -297,7 +297,6 @@ void cons_presence_setting(void);
 void cons_wrap_setting(void);
 void cons_winstidy_setting(void);
 void cons_time_setting(void);
-void cons_mouse_setting(void);
 void cons_statuses_setting(void);
 void cons_titlebar_setting(void);
 void cons_notify_setting(void);
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;
diff --git a/src/ui/window.h b/src/ui/window.h
index 2728c66c..35f82f1c 100644
--- a/src/ui/window.h
+++ b/src/ui/window.h
@@ -68,7 +68,6 @@ void win_redraw(ProfWin *window);
 int win_roster_cols(void);
 int win_occpuants_cols(void);
 void win_printline_nowrap(WINDOW *win, char *msg);
-void win_mouse(ProfWin *current, const wint_t ch, const int result);
 void win_mark_received(ProfWin *window, const char * const id);
 
 gboolean win_has_active_subwin(ProfWin *window);