Skip to content
Permalink
Browse files

Fix hide in tray on windows.

Another override that did no longer apply after the
Qt 5 transition. In this case winEvent which we
overrode in Qt 4 was replaced with nativeEvent in
Qt 5.

Partially fixes #1336
  • Loading branch information...
hacst committed Sep 19, 2014
1 parent ddab6ed commit 7c4fbee2248248003e14a27f6b2e59ad4603b104
Showing with 9 additions and 0 deletions.
  1. +5 −0 src/mumble/MainWindow.cpp
  2. +4 −0 src/mumble/MainWindow.h
@@ -382,7 +382,12 @@ void MainWindow::msgBox(QString msg) {
}

#ifdef Q_OS_WIN
#if QT_VERSION >= 0x050000
bool MainWindow::nativeEvent(const QByteArray &, void *message, long *result) {
MSG *msg = reinterpret_cast<MSG *>(message);
#else
bool MainWindow::winEvent(MSG *msg, long *) {
#endif
if (msg->message == WM_DEVICECHANGE && msg->wParam == DBT_DEVNODES_CHANGED)
uiNewHardware++;
else if (msg->message == WM_ACTIVATE && msg->wParam == WA_INACTIVE)
@@ -139,7 +139,11 @@ class MainWindow : public QMainWindow, public MessageHandler, public Ui::MainWin

#ifdef Q_OS_WIN
Timer tInactive;
#if QT_VERSION >= 0x050000
bool nativeEvent(const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE;
#else
bool winEvent(MSG *, long *) Q_DECL_OVERRIDE;
#endif
unsigned int uiNewHardware;
#endif
protected:

0 comments on commit 7c4fbee

Please sign in to comment.
You can’t perform that action at this time.