From 045ead985c1e320f289704b6a995d48a5eccf59e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 23 Jul 2024 16:41:52 +0200 Subject: notify: don't focus/report on notification dismissal Only do it when the notification was activated. Here, activated means the 'click to activate' notification action was triggered. How do we tie everything together? First, we add a new template parameter, ${action}. It's intended to be used with e.g. notify-send's --action option. When the action is triggered, notify-send prints its name on stdout, on a separate line. Look for this in stdout. Only if we've seen it do we focus/report the notification. --- notify.h | 1 + 1 file changed, 1 insertion(+) (limited to 'notify.h') diff --git a/notify.h b/notify.h index 90fbf9fc..ba017276 100644 --- a/notify.h +++ b/notify.h @@ -45,6 +45,7 @@ struct notification { * Used internally by notify */ + bool activated; /* User 'activated' the notification */ char *xdg_token; /* XDG activation token, from daemon */ pid_t pid; /* Notifier command PID */ -- cgit v1.3