Skip to content

Commit

Permalink
fix repeating popdown
Browse files Browse the repository at this point in the history
  • Loading branch information
NamorNiradnug committed Aug 2, 2022
1 parent 6c48801 commit e50c6e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/panel/widgets/notifications/notification-center.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ void WayfireNotificationCenter::newNotification(Notification::id_type id)
if (!popover_timeout.empty() || !popover->is_visible())
{
popover_timeout.disconnect();
popover_timeout = Glib::signal_timeout().connect([=]() -> bool { popover->popdown(); }, timeout * 1000);
popover_timeout = Glib::signal_timeout().connect(
[=] {
popover->popdown();
popover_timeout.disconnect();
return true;
},
timeout * 1000);
}
popover->popup();
}
Expand Down
1 change: 0 additions & 1 deletion src/panel/widgets/notifications/single-notification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "daemon.hpp"
#include <gtk-utils.hpp>
#include <gtkmm/icontheme.h>
#include <iostream>
#include <string>

const static std::string FILE_PREFIX = "file://";
Expand Down

0 comments on commit e50c6e4

Please sign in to comment.