Clicking a notification will now remove it
1 files changed, 26 insertions(+), 0 deletions(-)

M plugins/notification.c
M plugins/notification.c +26 -0
@@ 462,3 462,29 @@ void rootbar_notification_get_info(void*
 		snprintf(out, size, format, info[0], info[1], info[2]);
 	}
 }
+
+void rootbar_notification_click(void* data, const char* button) {
+	if(strcmp(button, "left") != 0) {
+		return;
+	}
+	struct notification* this = data;
+	if(_app_name != NULL) {
+		free(_app_name);
+	}
+	_app_name = NULL;
+
+	if(this->app_name != NULL) {
+		free(this->app_name);
+	}
+	this->app_name = NULL;
+
+	if(this->body != NULL) {
+		free(this->body);
+	}
+	this->body = NULL;
+
+	if(this->summary != NULL) {
+		free(this->summary);
+	}
+	this->summary = NULL;
+}