menu_mode_cb needs to return a screen also.

This commit is contained in:
Nicholas Marriott
2020-05-02 15:15:52 +01:00
parent e078f975c5
commit cb1131a294
2 changed files with 9 additions and 8 deletions

8
menu.c
View File

@ -130,14 +130,12 @@ menu_free(struct menu *menu)
free(menu);
}
static int
static struct screen *
menu_mode_cb(struct client *c, __unused u_int *cx, __unused u_int *cy)
{
struct menu_data *md = c->overlay_data;
if (~md->flags & MENU_NOMOUSE)
return (MODE_MOUSE_ALL);
return (0);
return (&md->s);
}
static void
@ -351,6 +349,8 @@ menu_display(struct menu *menu, int flags, struct cmdq_item *item, u_int px,
if (fs != NULL)
cmd_find_copy_state(&md->fs, fs);
screen_init(&md->s, menu->width + 4, menu->count + 2, 0);
if (~md->flags & MENU_NOMOUSE)
md->s.mode |= MODE_MOUSE_ALL;
md->px = px;
md->py = py;