Ticket #1624: mc-4.6.2-alt-Eterm.patch
File mc-4.6.2-alt-Eterm.patch, 1.1 KB (added by andrew_b, 15 years ago) |
---|
-
mc/src/mouse.c
old new void init_mouse (void) 47 47 switch (use_mouse_p) { 48 48 #ifdef HAVE_LIBGPM 49 49 case MOUSE_NONE: 50 use_mouse_p = MOUSE_GPM; 50 { 51 int mouse_d; 52 Gpm_Connect conn; 53 54 mouse_d = Gpm_Open (&conn, 0); 55 switch (mouse_d) { 56 case -1: 57 use_mouse_p = MOUSE_NONE; 58 break; 59 case -2: 60 use_mouse_p = MOUSE_XTERM; 61 define_sequence (MCKEY_MOUSE, xmouse_seq, MCKEY_NOACTION); 62 break; 63 default: 64 use_mouse_p = MOUSE_GPM; 65 break; 66 } 67 Gpm_Close(); 68 } 51 69 break; 52 70 #endif /* HAVE_LIBGPM */ 53 71 case MOUSE_XTERM_NORMAL_TRACKING: … … void enable_mouse (void) 70 88 #ifdef HAVE_LIBGPM 71 89 case MOUSE_GPM: 72 90 { 73 int mouse_d;74 91 Gpm_Connect conn; 75 92 76 93 conn.eventMask = ~GPM_MOVE; … … void enable_mouse (void) 78 95 conn.minMod = 0; 79 96 conn.maxMod = 0; 80 97 81 mouse_d = Gpm_Open (&conn, 0); 82 if (mouse_d == -1) { 83 use_mouse_p = MOUSE_NONE; 84 return; 85 } 98 Gpm_Open (&conn, 0); 86 99 mouse_enabled = 1; 87 100 } 88 101 break;