Add a -O flag to display-menu to change the mouse behaviour and not

close the menu when the mouse is released, from teo_paul1 at yahoo dot
com.
This commit is contained in:
nicm
2020-10-30 08:55:56 +00:00
parent a868bacb46
commit 649e5970e9
5 changed files with 33 additions and 9 deletions

View File

@ -1693,8 +1693,8 @@ server_client_reset_state(struct client *c)
* mode.
*/
if (options_get_number(oo, "mouse")) {
mode &= ~ALL_MOUSE_MODES;
if (c->overlay_draw == NULL) {
mode &= ~ALL_MOUSE_MODES;
TAILQ_FOREACH(loop, &w->panes, entry) {
if (loop->screen->mode & MODE_MOUSE_ALL)
mode |= MODE_MOUSE_ALL;