1
0
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

Added Cywin mouse wheel handling

This commit is contained in:
James Booth 2012-11-25 17:37:04 +00:00
parent f6ca1ba15e
commit a42ff49dab

View File

@ -107,7 +107,12 @@ gui_init(void)
initscr();
raw();
keypad(stdscr, TRUE);
#ifdef PLATFORM_CYGWIN
mousemask(BUTTON5_PRESSED | BUTTON4_PRESSED, NULL);
#else
mousemask(BUTTON2_PRESSED | BUTTON4_PRESSED, NULL);
#endif
mouseinterval(5);
win_load_colours();
@ -1817,7 +1822,12 @@ _win_handle_page(const int * const ch)
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