This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch tymux-10-quiet-head
in repository terminology.
View the commit online.
commit df3f13580ca3721af5b97f0f6388896c9e23fd6c
Author: Boris Faure <[email protected]>
AuthorDate: Sat Oct 31 11:35:14 2026 +0000
termptyesc: gate OSC 777 on notification_escapes
With the option off, the sequence is dropped before it reaches the
notification code.
---
src/bin/termpty.c | 27 +++++++++++++++++++++++++++
src/bin/termptyesc.c | 2 ++
src/bin/tytest.c | 1 +
src/bin/unit_tests.h | 1 +
4 files changed, 31 insertions(+)
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 88f63d56..81d6c6e3 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -2681,6 +2681,33 @@ tytest_xtgettcap(void)
return 0;
}
+#if defined(BINARY_TYTEST)
+/* OSC 777 is dropped entirely, notifications included, when gated off. */
+int
+tytest_notify_gated(void)
+{
+ Termpty ty;
+
+ _ty_test_init(&ty, 80, 24);
+
+ tytest_notifications_clear();
+ _ty_feed(&ty, "\x1b]777;notify;Visible;yes\x07");
+ assert(tytest_notifications_get());
+
+ ty.config->notification_escapes = EINA_FALSE;
+ _ty_feed(&ty, "\x1b]777;notify;Hidden;no\x07");
+ assert(tytest_notifications_get());
+ assert(!strstr(tytest_notifications_get(), "Hidden"));
+
+ ty.config->notification_escapes = EINA_TRUE;
+ _ty_feed(&ty, "\x1b]777;notify;Shown;again\x07");
+ assert(strstr(tytest_notifications_get(), "again"));
+
+ _ty_test_shutdown(&ty);
+ return 0;
+}
+#endif
+
/* DECRQSS: an unsupported request is answered "invalid", DECSCL keeps its
* reply, and a DCS that is not DECRQSS stays silent. */
int
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 2e769ab8..e7deaf0f 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -5515,6 +5515,8 @@ _handle_esc_osc(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
break;
case 777:
DBG("xterm notification support");
+ if (!ty->config->notification_escapes)
+ break;
if (!p || !*p)
goto err;
s = eina_unicode_unicode_to_utf8(p, &len);
diff --git a/src/bin/tytest.c b/src/bin/tytest.c
index 8358cb45..0bd73396 100644
--- a/src/bin/tytest.c
+++ b/src/bin/tytest.c
@@ -72,6 +72,7 @@ static struct {
{ "xmodkeys_reset", tytest_xmodkeys_reset},
{ "xtgettcap", tytest_xtgettcap},
{ "tcap_table_sorted", tytest_tcap_table_sorted},
+ { "notify_gated", tytest_notify_gated},
{ "decrqss_invalid", tytest_decrqss_invalid},
{ "decrqss_sgr", tytest_decrqss_sgr},
{ "decrqss_settings", tytest_decrqss_settings},
diff --git a/src/bin/unit_tests.h b/src/bin/unit_tests.h
index a808941f..f04ce171 100644
--- a/src/bin/unit_tests.h
+++ b/src/bin/unit_tests.h
@@ -46,6 +46,7 @@ int tytest_xmodkeys_query(void);
int tytest_xmodkeys_reset(void);
int tytest_xtgettcap(void);
int tytest_tcap_table_sorted(void);
+int tytest_notify_gated(void);
int tytest_decrqss_invalid(void);
int tytest_decrqss_sgr(void);
int tytest_decrqss_settings(void);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.