* key.c (xmouse_get_event): Catch GPM_DRAG event.

* mouse.c (enable_mouse, disable_mouse): Update printed escape sequence.
This commit is contained in:
Leonard den Ottolander 2005-09-28 17:21:53 +00:00
parent 4972324b16
commit 9ac5ed8d4e
3 changed files with 14 additions and 3 deletions

View File

@ -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

View File

@ -512,7 +512,12 @@ xmouse_get_event (Gpm_Event *ev)
ev->type = 0;
}
} else {
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++;

View File

@ -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");