version 1.14, 2020/04/13 10:59:58 |
version 1.15, 2020/04/13 13:42:35 |
|
|
*px = wp->xoff - ox; |
*px = wp->xoff - ox; |
else |
else |
*px = 0; |
*px = 0; |
} else if (strcmp(xp, "M") == 0 && shared->mouse.valid) { |
} else if (strcmp(xp, "M") == 0) { |
if (shared->mouse.x > w / 2) |
if (shared->event.m.valid && shared->event.m.x > w / 2) |
*px = shared->mouse.x - w / 2; |
*px = shared->event.m.x - w / 2; |
else |
else |
*px = 0; |
*px = 0; |
} else if (strcmp(xp, "W") == 0) { |
} else if (strcmp(xp, "W") == 0) { |
|
|
*py = wp->yoff + wp->sy - oy; |
*py = wp->yoff + wp->sy - oy; |
else |
else |
*py = 0; |
*py = 0; |
} else if (strcmp(yp, "M") == 0 && shared->mouse.valid) |
} else if (strcmp(yp, "M") == 0) { |
*py = shared->mouse.y + h; |
if (shared->event.m.valid) |
else if (strcmp(yp, "S") == 0) { |
*py = shared->event.m.y + h; |
|
else |
|
*py = 0; |
|
} else if (strcmp(yp, "S") == 0) { |
if (options_get_number(s->options, "status-position") == 0) { |
if (options_get_number(s->options, "status-position") == 0) { |
if (lines != 0) |
if (lines != 0) |
*py = lines + h; |
*py = lines + h; |
|
|
else |
else |
*py = c->tty.sy; |
*py = c->tty.sy; |
} |
} |
} |
} else if (strcmp(yp, "W") == 0) { |
else if (strcmp(yp, "W") == 0) { |
|
if (options_get_number(s->options, "status-position") == 0) { |
if (options_get_number(s->options, "status-position") == 0) { |
if (lines != 0) |
if (lines != 0) |
*py = line + 1 + h; |
*py = line + 1 + h; |
|
|
cmd_display_menu_get_position(c, item, args, &px, &py, menu->width + 4, |
cmd_display_menu_get_position(c, item, args, &px, &py, menu->width + 4, |
menu->count + 2); |
menu->count + 2); |
|
|
if (!shared->mouse.valid) |
if (!shared->event.m.valid) |
flags |= MENU_NOMOUSE; |
flags |= MENU_NOMOUSE; |
if (menu_display(menu, flags, item, px, py, c, target, NULL, NULL) != 0) |
if (menu_display(menu, flags, item, px, py, c, target, NULL, NULL) != 0) |
return (CMD_RETURN_NORMAL); |
return (CMD_RETURN_NORMAL); |