Permalink
Browse files

Fixed minimize on click on tray icon

More info: https://bugs.gentoo.org/show_bug.cgi?id=408197#c10
Guys, please, report bugs directly to GitHub, not to your distro's bug
tracker
  • Loading branch information...
1 parent 9f82055 commit 6081982eb0c2184ff94362425d328120bc283016 @kekekeks committed Mar 27, 2012
Showing with 13 additions and 3 deletions.
  1. +11 −1 mainwindow.cpp
  2. +1 −1 mainwindow.h
  3. +1 −1 skypetab.cpp
View
@@ -52,7 +52,6 @@ STabMainWindow::STabMainWindow(QWidget *parent) :
FocusGuard::addGuardedWidget(this);
startTimer(300);
- activeWidget=0;
_tabs->setFocusPolicy(Qt::NoFocus);
connect(_tabs, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
@@ -444,3 +443,14 @@ void STabMainWindow::tabCloseRequested(int index)
cont->widget()->close();
}
}
+
+bool skypetab::STabMainWindow::hasActiveTab()
+{
+ for(int i=0; i<_tabs->count();i++)
+ {
+ STWindowContainer*cont=((STWindowContainer*)(_tabs->widget(i)));
+ if(cont->widget()->isActiveWindow())
+ return true;
+ }
+ return false;
+}
View
@@ -23,7 +23,7 @@ class STabMainWindow : public QMainWindow
~STabMainWindow();
STWindowContainer *AddTab(QWidget *tab);
void SetMainWindow(QWidget *tab);
- QWidget *activeWidget;
+ bool hasActiveTab();
void toggleContacts();
bool activateTab(QWidget *widget);
protected:
View
@@ -305,7 +305,7 @@ void SkypeTab::raiseTrayMenuActivated(QSystemTrayIcon::ActivationReason reason)
void SkypeTab::onTrayIcon()
{
stage2Init();
- if((SkypeTab::winManager==Generic) && mainWindow->isActiveWindow())
+ if((SkypeTab::winManager==Generic) && (mainWindow->isActiveWindow()||mainWindow->hasActiveTab()))
{
mainWindow->setWindowState(mainWindow->windowState() & ~Qt::WindowActive | Qt::WindowMinimized);

0 comments on commit 6081982

Please sign in to comment.