From 209c1b999f121d23cb4604659577998e9c854d0c Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 13 Apr 2020 14:46:05 +0000 Subject: Move cmdq_state into cmd-queue.c. --- usr.bin/tmux/cmd-display-menu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'usr.bin/tmux/cmd-display-menu.c') diff --git a/usr.bin/tmux/cmd-display-menu.c b/usr.bin/tmux/cmd-display-menu.c index 51b57bec412..118defbe98a 100644 --- a/usr.bin/tmux/cmd-display-menu.c +++ b/usr.bin/tmux/cmd-display-menu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-display-menu.c,v 1.16 2020/04/13 14:04:25 nicm Exp $ */ +/* $OpenBSD: cmd-display-menu.c,v 1.17 2020/04/13 14:46:04 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott @@ -65,8 +65,8 @@ static void cmd_display_menu_get_position(struct client *c, struct cmdq_item *item, struct args *args, u_int *px, u_int *py, u_int w, u_int h) { - struct cmdq_state *state = cmdq_get_state(item); struct cmd_find_state *target = cmdq_get_target(item); + struct key_event *event = cmdq_get_event(item); struct session *s = c->session; struct winlink *wl = target->wl; struct window_pane *wp = target->wp; @@ -100,8 +100,8 @@ cmd_display_menu_get_position(struct client *c, struct cmdq_item *item, else *px = 0; } else if (strcmp(xp, "M") == 0) { - if (state->event.m.valid && state->event.m.x > w / 2) - *px = state->event.m.x - w / 2; + if (event->m.valid && event->m.x > w / 2) + *px = event->m.x - w / 2; else *px = 0; } else if (strcmp(xp, "W") == 0) { @@ -134,8 +134,8 @@ cmd_display_menu_get_position(struct client *c, struct cmdq_item *item, else *py = 0; } else if (strcmp(yp, "M") == 0) { - if (state->event.m.valid) - *py = state->event.m.y + h; + if (event->m.valid) + *py = event->m.y + h; else *py = 0; } else if (strcmp(yp, "S") == 0) { @@ -176,8 +176,8 @@ static enum cmd_retval cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args(self); - struct cmdq_state *state = cmdq_get_state(item); struct cmd_find_state *target = cmdq_get_target(item); + struct key_event *event = cmdq_get_event(item); struct client *c; struct menu *menu = NULL; struct menu_item menu_item; @@ -230,7 +230,7 @@ cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item) cmd_display_menu_get_position(c, item, args, &px, &py, menu->width + 4, menu->count + 2); - if (!state->event.m.valid) + if (!event->m.valid) flags |= MENU_NOMOUSE; if (menu_display(menu, flags, item, px, py, c, target, NULL, NULL) != 0) return (CMD_RETURN_NORMAL); -- cgit v1.2.3