Removed /mouse command

This commit is contained in:
James Booth
2015-07-19 22:48:12 +01:00
parent f3326bf105
commit 46e2f11b93
11 changed files with 6 additions and 89 deletions

View File

@@ -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)
{