From 4d17a1b0c29e8fd8510c75db1efb203b9b4f9eb0 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Sun, 14 Apr 2013 22:11:55 +0200 Subject: fix: GUI Disappearing #1522 (Mac OSX) - this solution works stable on mac and ensures that the window get's reopened when the user clicks the dock icon . - tested on 10.8 with Qt4.8.4 and Qt5.0.1 Signed-off-by: Jonas Schnelli --- src/qt/bitcoingui.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qt/bitcoingui.cpp') diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 14d738d9da..f6ea945c79 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -155,6 +155,7 @@ BitcoinGUI::~BitcoinGUI() trayIcon->hide(); #ifdef Q_OS_MAC delete appMenuBar; + MacDockIconHandler::instance()->setMainWindow(NULL); #endif } @@ -382,6 +383,7 @@ void BitcoinGUI::createTrayIconMenu() #else // Note: On Mac, the dock icon is used to provide the tray's functionality. MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance(); + dockIconHandler->setMainWindow((QMainWindow *)this); trayIconMenu = dockIconHandler->dockMenu(); #endif -- cgit v1.2.3