Fix a bug on clicking in panels (on Mac and Linux) ##panels

This commit is contained in:
Vane11ope 2020-02-06 08:19:33 +09:00 committed by GitHub
parent 4435011c8d
commit 2d7f7e4e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View File

@ -208,13 +208,7 @@ R_API int r_cons_arrow_to_hjkl(int ch) {
}
pos[p++] = 0;
y = atoi (pos);
// M is mouse down , m is mouse up
if (ch == 'M' || ch == 'm') {
r_cons_set_click (x, y);
if (ch == 'm') {
return INT8_MAX - 1;
}
}
r_cons_set_click (x, y);
}
return 0;
case '[':

View File

@ -1967,7 +1967,7 @@ bool __handle_mouse(RCore *core, RPanel *panel, int *key) {
if (__drag_and_resize (core)) {
return true;
}
if (*key == 0) {
if (!*key) {
int x, y;
if (r_cons_get_click (&x, &y)) {
if (y == MENU_Y && __handle_mouse_on_top (core, x, y)) {