Patch 7.4.938
Problem:    X11 and GTK have moure mouse buttons than Vim supports.
Solution:   Recognize more mouse buttons. (Benoit Pierre, closes #498)
Files:      src/gui_gtk_x11.c, src/gui_x11.c


*** ../vim-7.4.937/src/gui_gtk_x11.c    2015-09-15 14:12:01.382632522 +0200
--- src/gui_gtk_x11.c   2015-11-24 15:37:55.319977459 +0100
***************
*** 1680,1696 ****
  
      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 */
      }
  
  #ifdef FEAT_XIM
--- 1680,1694 ----
  
      switch (event->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
*** ../vim-7.4.937/src/gui_x11.c        2015-09-15 14:12:01.382632522 +0200
--- src/gui_x11.c       2015-11-24 15:36:47.524723361 +0100
***************
*** 1127,1137 ****
--- 1127,1142 ----
                        gui_x11_timer_cb, &timed_out);
            switch (event->xbutton.button)
            {
+               /* keep in sync with gui_gtk_x11.c */
                case Button1:   button = MOUSE_LEFT;    break;
                case Button2:   button = MOUSE_MIDDLE;  break;
                case Button3:   button = MOUSE_RIGHT;   break;
                case Button4:   button = MOUSE_4;       break;
                case Button5:   button = MOUSE_5;       break;
+               case 6:         button = MOUSE_7;       break;
+               case 7:         button = MOUSE_6;       break;
+               case 8:         button = MOUSE_X1;      break;
+               case 9:         button = MOUSE_X2;      break;
                default:
                    return;     /* Unknown button */
            }
*** ../vim-7.4.937/src/version.c        2015-11-24 15:18:28.032829239 +0100
--- src/version.c       2015-11-24 15:28:38.946100648 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     938,
  /**/

-- 
In a world without fences, who needs Gates and Windows?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui