ui: multigrid mouse support

This commit is contained in:
Björn Linse
2019-01-01 12:46:47 +01:00
parent 8a5c68f695
commit a2be9c7218
14 changed files with 672 additions and 86 deletions

View File

@@ -1187,10 +1187,11 @@ void save_typebuf(void)
alloc_typebuf();
}
static int old_char = -1; /* character put back by vungetc() */
static int old_mod_mask; /* mod_mask for ungotten character */
static int old_mouse_row; /* mouse_row related to old_char */
static int old_mouse_col; /* mouse_col related to old_char */
static int old_char = -1; // character put back by vungetc()
static int old_mod_mask; // mod_mask for ungotten character
static int old_mouse_grid; // mouse_grid related to old_char
static int old_mouse_row; // mouse_row related to old_char
static int old_mouse_col; // mouse_col related to old_char
/*
@@ -1391,6 +1392,7 @@ int vgetc(void)
c = old_char;
old_char = -1;
mod_mask = old_mod_mask;
mouse_grid = old_mouse_grid;
mouse_row = old_mouse_row;
mouse_col = old_mouse_col;
} else {
@@ -1585,6 +1587,7 @@ vungetc ( /* unget one character (can only be done once!) */
{
old_char = c;
old_mod_mask = mod_mask;
old_mouse_grid = mouse_grid;
old_mouse_row = mouse_row;
old_mouse_col = mouse_col;
}