Do not send focus sequences when focus is enabled or disabled by the
authornicm <nicm@openbsd.org>
Mon, 30 May 2022 12:51:27 +0000 (12:51 +0000)
committernicm <nicm@openbsd.org>
Mon, 30 May 2022 12:51:27 +0000 (12:51 +0000)
application if it is turned off. GitHub issue 3142.

usr.bin/tmux/input.c

index 86f6b60..8f3d04e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.200 2022/03/08 12:01:19 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.201 2022/05/30 12:51:27 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1798,6 +1798,8 @@ input_csi_dispatch_sm_private(struct input_ctx *ictx)
                        screen_write_mode_set(sctx, MODE_FOCUSON);
                        if (wp == NULL)
                                break;
+                       if (!options_get_number(global_options, "focus-events"))
+                               break;
                        if (wp->flags & PANE_FOCUSED)
                                bufferevent_write(wp->event, "\033[I", 3);
                        else