close one notification to close all
This commit is contained in:
@@ -3,15 +3,13 @@
|
||||
#include <memory>
|
||||
|
||||
#include "services/dbus/messages.hpp"
|
||||
#include "widgets/notification/notification.hpp"
|
||||
#include "widgets/notification/notificationWindow.hpp"
|
||||
#include "widgets/notification/spotifyNotification.hpp"
|
||||
|
||||
#include "gdkmm/display.h"
|
||||
#include "glibmm/main.h"
|
||||
|
||||
|
||||
#define DEFAULT_NOTIFICATION_TIMEOUT 4000
|
||||
|
||||
std::shared_ptr<NotificationController> NotificationController::instance = nullptr;
|
||||
|
||||
NotificationController::NotificationController() {
|
||||
@@ -60,7 +58,11 @@ void NotificationController::showNotificationOnAllMonitors(NotifyMessage notify)
|
||||
notification->show();
|
||||
// -1 means use default timeout, 0 means never expire
|
||||
if (timeout <= 0) {
|
||||
timeout = DEFAULT_NOTIFICATION_TIMEOUT; // default to 3 seconds
|
||||
timeout = DEFAULT_NOTIFICATION_TIMEOUT;
|
||||
}
|
||||
|
||||
if (timeout == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Glib::signal_timeout().connect([notification]() {
|
||||
|
||||
Reference in New Issue
Block a user