Skip to content

Commit

Permalink
removed qApp->processEvents from tray icon
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-bibb committed Dec 13, 2014
1 parent ee484b7 commit 17741c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions apps/cmstapp/code/control_box/controlbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1710,14 +1710,7 @@ void ControlBox::createSystemTrayIcon(bool b_startminimized)
connect(trayicon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));

// Assemble the tray icon (set the icon to display)
assembleTrayIcon();

// This code block I found several places on how to work around tray icons
// not showing properly with GTK based trays. May not be necessary with
// QT5.4 but leave it in if it does not hurt anything.
trayicon->setVisible(true);
trayicon->setVisible(false);
qApp->processEvents();
assembleTrayIcon();

// QT5.3 and XFCE don't play nicely. Hammer the XFCE tray up to
// maxtries to get a valid icon geometry.
Expand All @@ -1730,6 +1723,7 @@ void ControlBox::createSystemTrayIcon(bool b_startminimized)
qDebug() << "icon geometry: " << trayicon->geometry();
if (trayicon->geometry().left() > 0 || trayicon->geometry().top() > 0) break;
trayicon->setVisible(false);
qApp->processEvents();
} // hammer loop
if (i == maxtries - 1) {
qDebug() << QString("Failed to get a valid icon from the systemtray in %1 tries").arg(maxtries);
Expand Down
2 changes: 1 addition & 1 deletion apps/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ DEALINGS IN THE SOFTWARE.

///////////////////////////////// Program Values ///////////////////////
// Program Info
#define VERSION "14.12.13-1"
#define VERSION "14.12.13-2"
#define RELEASE_DATE "5 December 2014"
#define COPYRIGHT_DATE "2013-2014"

Expand Down

0 comments on commit 17741c9

Please sign in to comment.