Skip to content

Commit

Permalink
Merge PR #2685: MainWindow: disable MainWindow::changeEvent on macOS;…
Browse files Browse the repository at this point in the history
… it causes Mumble to be non-interactive after restoring from being minimized.
  • Loading branch information
mkrautz committed Dec 1, 2016
2 parents 9b4ee06 + 0f170bf commit c45298e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/mumble/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,19 @@ void MainWindow::showEvent(QShowEvent *e) {

void MainWindow::changeEvent(QEvent *e) {
QWidget::changeEvent(e);

#ifdef Q_OS_MAC
// On modern macOS/Qt combinations, the code below causes Mumble's
// MainWindow to not be interactive after returning from being minimized.
// (See issue mumble-voip/mumble#2171)
// So, let's not do it on macOS.

#else
if (isMinimized() && g.s.bHideInTray) {
// Workaround http://qt-project.org/forums/viewthread/4423/P15/#50676
QTimer::singleShot(0, this, SLOT(hide()));
}
#endif
}

void MainWindow::keyPressEvent(QKeyEvent *e) {
Expand Down

0 comments on commit c45298e

Please sign in to comment.