Send focus events to pane when entering or leaving popup, GitHub issue
authornicm <nicm@openbsd.org>
Sat, 5 Oct 2024 12:10:16 +0000 (12:10 +0000)
committernicm <nicm@openbsd.org>
Sat, 5 Oct 2024 12:10:16 +0000 (12:10 +0000)
3991.

usr.bin/tmux/server-client.c
usr.bin/tmux/window.c

index 6e63416..c63c762 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.410 2024/10/01 06:15:47 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.411 2024/10/05 12:10:16 nicm Exp $ */
 
 /*
  * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -121,6 +121,7 @@ server_client_set_overlay(struct client *c, u_int delay,
                c->tty.flags |= TTY_FREEZE;
        if (c->overlay_mode == NULL)
                c->tty.flags |= TTY_NOCURSOR;
+       window_update_focus(c->session->curw->window);
        server_redraw_client(c);
 }
 
@@ -145,6 +146,7 @@ server_client_clear_overlay(struct client *c)
        c->overlay_data = NULL;
 
        c->tty.flags &= ~(TTY_FREEZE|TTY_NOCURSOR);
+       window_update_focus(c->session->curw->window);
        server_redraw_client(c);
 }
 
index 2c92c4f..ab0b49e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.294 2024/10/01 08:01:19 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.295 2024/10/05 12:10:16 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -482,7 +482,8 @@ window_pane_update_focus(struct window_pane *wp)
                                if (c->session != NULL &&
                                    c->session->attached != 0 &&
                                    (c->flags & CLIENT_FOCUSED) &&
-                                   c->session->curw->window == wp->window) {
+                                   c->session->curw->window == wp->window &&
+                                   c->overlay_draw == NULL) {
                                        focused = 1;
                                        break;
                                }