version 1.5, 2020/03/18 09:13:49 |
version 1.6, 2020/03/19 13:32:49 |
|
|
*px = 0; |
*px = 0; |
else if (strcmp(xp, "R") == 0) |
else if (strcmp(xp, "R") == 0) |
*px = c->tty.sx - 1; |
*px = c->tty.sx - 1; |
|
else if (strcmp(xp, "C") == 0) |
|
*px = (c->tty.sx - 1) / 2 - w / 2; |
else if (strcmp(xp, "P") == 0) { |
else if (strcmp(xp, "P") == 0) { |
tty_window_offset(&c->tty, &ox, &oy, &sx, &sy); |
tty_window_offset(&c->tty, &ox, &oy, &sx, &sy); |
if (wp->xoff >= ox) |
if (wp->xoff >= ox) |
|
|
yp = args_get(args, 'y'); |
yp = args_get(args, 'y'); |
if (yp == NULL) |
if (yp == NULL) |
*py = 0; |
*py = 0; |
|
else if (strcmp(yp, "C") == 0) |
|
*py = (c->tty.sy - 1) / 2 + h / 2; |
else if (strcmp(yp, "P") == 0) { |
else if (strcmp(yp, "P") == 0) { |
tty_window_offset(&c->tty, &ox, &oy, &sx, &sy); |
tty_window_offset(&c->tty, &ox, &oy, &sx, &sy); |
if (wp->yoff + wp->sy >= oy) |
if (wp->yoff + wp->sy >= oy) |
|
|
struct menu_item menu_item; |
struct menu_item menu_item; |
const char *key; |
const char *key; |
char *title, *name; |
char *title, *name; |
int flags, i; |
int flags = 0, i; |
u_int px, py; |
u_int px, py; |
|
|
if ((c = cmd_find_client(item, args_get(args, 'c'), 0)) == NULL) |
if ((c = cmd_find_client(item, args_get(args, 'c'), 0)) == NULL) |
|
|
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); |
|
|
flags = 0; |
|
if (!item->shared->mouse.valid) |
if (!item->shared->mouse.valid) |
flags |= MENU_NOMOUSE; |
flags |= MENU_NOMOUSE; |
if (menu_display(menu, flags, item, px, py, c, fs, NULL, NULL) != 0) |
if (menu_display(menu, flags, item, px, py, c, fs, NULL, NULL) != 0) |