0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 7.4.938

Problem:    X11 and GTK have moure mouse buttons than Vim supports.
Solution:   Recognize more mouse buttons. (Benoit Pierre, closes #498)
This commit is contained in:
Bram Moolenaar
2015-11-24 15:38:44 +01:00
parent 5ad075c073
commit 88e484bf1b
3 changed files with 16 additions and 11 deletions

View File

@@ -1680,17 +1680,15 @@ button_press_event(GtkWidget *widget,
switch (event->button)
{
case 1:
button = MOUSE_LEFT;
break;
case 2:
button = MOUSE_MIDDLE;
break;
case 3:
button = MOUSE_RIGHT;
break;
default:
return FALSE; /* Unknown button */
/* Keep in sync with gui_x11.c.
* Buttons 4-7 are handled in scroll_event() */
case 1: button = MOUSE_LEFT; break;
case 2: button = MOUSE_MIDDLE; break;
case 3: button = MOUSE_RIGHT; break;
case 8: button = MOUSE_X1; break;
case 9: button = MOUSE_X2; break;
default:
return FALSE; /* Unknown button */
}
#ifdef FEAT_XIM