mirror of
https://github.com/tmux/tmux.git
synced 2025-12-20 22:36:03 +00:00
Try 2. Move popup focus flag into client struct.
This commit is contained in:
@@ -2630,7 +2630,7 @@ server_client_handle_key(struct client *c, struct key_event *event)
|
||||
if (c->overlay_key != NULL) {
|
||||
done = c->overlay_key(c, c->overlay_data, event);
|
||||
TAILQ_FOREACH(wp, &c->session->curw->window->panes, entry) {
|
||||
if (wp->flags & PANE_FOCUSED)
|
||||
if (~c->flags & CLIENT_OVERLAYPOPUP_FOCUSED)
|
||||
goto focused;
|
||||
}
|
||||
if (done)
|
||||
@@ -2915,7 +2915,7 @@ server_client_reset_state(struct client *c)
|
||||
tty->flags &= ~TTY_BLOCK;
|
||||
|
||||
/* Get mode from overlay if any, else from screen. */
|
||||
if (c->overlay_draw != NULL && ~wp->flags & PANE_FOCUSED) {
|
||||
if (c->overlay_draw != NULL && c->flags & CLIENT_OVERLAYPOPUP_FOCUSED) {
|
||||
if (c->overlay_mode != NULL)
|
||||
s = c->overlay_mode(c, c->overlay_data, &cx, &cy);
|
||||
} else if (c->prompt_string == NULL)
|
||||
@@ -2946,7 +2946,7 @@ server_client_reset_state(struct client *c)
|
||||
cy = tty->sy - n;
|
||||
}
|
||||
cx = c->prompt_cursor;
|
||||
} else if (c->overlay_draw == NULL || wp->flags & PANE_FOCUSED) {
|
||||
} else if (c->overlay_draw == NULL || ~c->flags & CLIENT_OVERLAYPOPUP_FOCUSED) {
|
||||
cursor = 0;
|
||||
tty_window_offset(tty, &ox, &oy, &sx, &sy);
|
||||
if (wp->xoff + s->cx >= ox && wp->xoff + s->cx <= ox + sx &&
|
||||
|
||||
Reference in New Issue
Block a user