Bring Quassel to front on tray icon click
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 29 Jan 2012 22:49:56 +0000 (23:49 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 29 Jan 2012 22:52:31 +0000 (23:52 +0100)
When the quassel window is below other windows it would be nice to have it raised on top of
the others when clicking on the system tray icon. Now it is just hidden and you have to click
on it once more to get it to the top.

Fixes #1135. Thanks to parapente for the patch!

src/uisupport/graphicalui.cpp

index ba772f0..a35a297 100644 (file)
@@ -201,7 +201,7 @@ bool GraphicalUi::checkMainWidgetVisibility(bool perform) {
   }
 #else
 
-  if(!mainWidget()->isVisible() || mainWidget()->isMinimized()) {
+  if(!mainWidget()->isVisible() || mainWidget()->isMinimized() || !mainWidget()->isActiveWindow()) {
     if(perform)
       minimizeRestore(true);
     return true;