diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 8cdd2ac66..9e5671598 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -673,7 +673,7 @@ void MainWindow::createMenuBar() actionMinimize->setShortcutContext(Qt::ApplicationShortcut); actionMinimize->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M)); actionMinimize->setShortcutVisibleInContextMenu(true); - connect(actionMinimize,SIGNAL(triggered()),this,SLOT(showMinimized())) ; + connect(actionMinimize,SIGNAL(triggered()),this,SLOT(minimizeWindow())) ; menuBar = new QMenuBar(this); QMenu *fileMenu = menuBar->addMenu(""); @@ -698,6 +698,13 @@ void MainWindow::createMenuBar() } #endif +#if defined(Q_OS_DARWIN) +void MainWindow::minimizeWindow() +{ + setWindowState(windowState() | Qt::WindowMinimized); +} +#endif + void MainWindow::showBandwidthGraph() { if(_bandwidthGraph == NULL) diff --git a/retroshare-gui/src/gui/MainWindow.h b/retroshare-gui/src/gui/MainWindow.h index 692d7ed55..7525a0e30 100644 --- a/retroshare-gui/src/gui/MainWindow.h +++ b/retroshare-gui/src/gui/MainWindow.h @@ -265,6 +265,10 @@ private slots: void toggleVisibility(QSystemTrayIcon::ActivationReason e); void toggleVisibilitycontextmenu(); +#if defined(Q_OS_DARWIN) + void minimizeWindow(); +#endif + /** Toolbar fns. */ void addFriend(); //void newRsCollection();