Fix notifications when minimized.
[quassel.git] / src / qtui / mainwin.cpp
index fc53283..a7306b8 100644 (file)
   #include "osxnotificationbackend.h"
 #endif
 
+#ifdef HAVE_DBUS
+  #include "dockmanagernotificationbackend.h"
+#endif
+
 #include "settingspages/aliasessettingspage.h"
 #include "settingspages/appearancesettingspage.h"
 #include "settingspages/backlogsettingspage.h"
@@ -226,6 +230,10 @@ void MainWin::init()
     QtUi::registerNotificationBackend(new OSXNotificationBackend(this));
 #endif
 
+#ifdef HAVE_DBUS
+    QtUi::registerNotificationBackend(new DockManagerNotificationBackend(this));
+#endif
+
     // we assume that at this point, all configurable actions are defined!
     QtUi::loadShortcuts();
 
@@ -644,7 +652,7 @@ void MainWin::removeBufferView(int bufferViewConfigId)
 
 void MainWin::bufferViewToggled(bool enabled)
 {
-    if (!enabled && !isVisible()) {
+    if (!enabled && !isMinimized()) {
         // hiding the mainwindow triggers a toggle of the bufferview (which pretty much sucks big time)
         // since this isn't our fault and we can't do anything about it, we suppress the resulting calls
         return;