mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
* key.c (xmouse_get_event): Catch GPM_DRAG event.
* mouse.c (enable_mouse, disable_mouse): Update printed escape sequence.
This commit is contained in:
parent
4972324b16
commit
9ac5ed8d4e
@ -1,3 +1,9 @@
|
||||
2005-09-28 Pavel Tsekov <ptsekov@gmx.net>
|
||||
|
||||
* key.c (xmouse_get_event): Catch GPM_DRAG event.
|
||||
* mouse.c (enable_mouse, disable_mouse): Update printed escape
|
||||
sequence.
|
||||
|
||||
2005-09-17 Pavel Tsekov <ptsekov@gmx.net>
|
||||
|
||||
* execute.c (do_execute): Flush stdout after printing the
|
||||
|
@ -512,7 +512,12 @@ xmouse_get_event (Gpm_Event *ev)
|
||||
ev->type = 0;
|
||||
}
|
||||
} else {
|
||||
ev->type = GPM_DOWN;
|
||||
if (btn >= 32 && btn <= 34) {
|
||||
btn -= 32;
|
||||
ev->type = GPM_DRAG;
|
||||
} else
|
||||
ev->type = GPM_DOWN;
|
||||
|
||||
GET_TIME (tv2);
|
||||
if (tv1.tv_sec && (DIF_TIME (tv1,tv2) < double_click_speed)){
|
||||
clicks++;
|
||||
|
@ -91,7 +91,7 @@ void enable_mouse (void)
|
||||
printf(ESC_STR "[?1001s");
|
||||
|
||||
/* enable mouse tracking */
|
||||
printf(ESC_STR "[?1000h");
|
||||
printf(ESC_STR "[?1002h");
|
||||
|
||||
fflush (stdout);
|
||||
mouse_enabled = 1;
|
||||
@ -117,7 +117,7 @@ void disable_mouse (void)
|
||||
#endif
|
||||
case MOUSE_XTERM:
|
||||
/* disable mouse tracking */
|
||||
printf(ESC_STR "[?1000l");
|
||||
printf(ESC_STR "[?1002l");
|
||||
|
||||
/* restore old highlight mouse tracking */
|
||||
printf(ESC_STR "[?1001r");
|
||||
|
Loading…
Reference in New Issue
Block a user