mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-05 11:04:42 +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>
|
2005-09-17 Pavel Tsekov <ptsekov@gmx.net>
|
||||||
|
|
||||||
* execute.c (do_execute): Flush stdout after printing the
|
* execute.c (do_execute): Flush stdout after printing the
|
||||||
|
@ -512,7 +512,12 @@ xmouse_get_event (Gpm_Event *ev)
|
|||||||
ev->type = 0;
|
ev->type = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ev->type = GPM_DOWN;
|
if (btn >= 32 && btn <= 34) {
|
||||||
|
btn -= 32;
|
||||||
|
ev->type = GPM_DRAG;
|
||||||
|
} else
|
||||||
|
ev->type = GPM_DOWN;
|
||||||
|
|
||||||
GET_TIME (tv2);
|
GET_TIME (tv2);
|
||||||
if (tv1.tv_sec && (DIF_TIME (tv1,tv2) < double_click_speed)){
|
if (tv1.tv_sec && (DIF_TIME (tv1,tv2) < double_click_speed)){
|
||||||
clicks++;
|
clicks++;
|
||||||
|
@ -91,7 +91,7 @@ void enable_mouse (void)
|
|||||||
printf(ESC_STR "[?1001s");
|
printf(ESC_STR "[?1001s");
|
||||||
|
|
||||||
/* enable mouse tracking */
|
/* enable mouse tracking */
|
||||||
printf(ESC_STR "[?1000h");
|
printf(ESC_STR "[?1002h");
|
||||||
|
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
mouse_enabled = 1;
|
mouse_enabled = 1;
|
||||||
@ -117,7 +117,7 @@ void disable_mouse (void)
|
|||||||
#endif
|
#endif
|
||||||
case MOUSE_XTERM:
|
case MOUSE_XTERM:
|
||||||
/* disable mouse tracking */
|
/* disable mouse tracking */
|
||||||
printf(ESC_STR "[?1000l");
|
printf(ESC_STR "[?1002l");
|
||||||
|
|
||||||
/* restore old highlight mouse tracking */
|
/* restore old highlight mouse tracking */
|
||||||
printf(ESC_STR "[?1001r");
|
printf(ESC_STR "[?1001r");
|
||||||
|
Loading…
Reference in New Issue
Block a user