GUI Disappearing #1522

issue fanquake opened this issue on June 26, 2012
  1. fanquake commented at 8:19 AM on June 26, 2012: member

    Since upgrading I've been having an issue where the GUI disappears completely.

    For example, I'll be using Bitcoin-Qt, then exit it using the red cross. If I then click on Bitcoin in the dock, the GUI no longer shows up. It has definitely been selected though, because the task bar changes to Bitcoin and shows Bitcoin options.

    Anyone else been having a similar problem?

  2. laanwj commented at 8:23 AM on June 26, 2012: member

    Needs more information; Upgrading from what version to what version? Which OS? Do you have "close to tray" enabled? Isn't it simply shutting down?

  3. fanquake commented at 8:34 AM on June 26, 2012: member

    Sorry, didn't copy the top half of my issue. OS X 10.7.4, upgrading from 0.6.2.2 to 0.6.3

    Close to tray?

  4. laanwj commented at 8:57 AM on June 26, 2012: member

    Never mind, that option doesn't exist on MacOSX.

    A problem with the dock icon on OSX has been solved something like a month ago:

    https://github.com/bitcoin/bitcoin/commit/b06f9c1364ab70763ded9c0c7ba795c0da72aa7a

    I'm not sure whether it is backported to 0.6.x, though.

  5. fanquake commented at 4:55 PM on July 13, 2012: member

    I've had a look into this, and adding that code back in actually fixes the problem.

  6. laanwj commented at 8:50 AM on July 14, 2012: member

    But that brings back the problems in #1327 right? We really need someone to hack on bitcoin ui on the mac, currently it's mostly guess work.

  7. Nerzahd commented at 9:14 AM on July 21, 2012: none

    Same problem here. i have to right-click at dock icon and select "Show/Hide Bitcoin" to bring the window back.

  8. laanwj commented at 8:14 AM on August 18, 2012: member

    Can anyone answer my question? Does re-adding that code bring back issue #1327?

  9. fanquake commented at 4:30 AM on August 31, 2012: member

    I have a feeling it does. Although that would probably be preferred over the gui dissapearing completely. Not all users would realise that they have to use show/hide to bring it back. Whereas they will more than likely click the dock icon more than once if the gui shows up and then dissapears.

  10. strk cross-referenced this on Dec 20, 2012 from issue GUI disappearing on minimize by strk
  11. strk commented at 3:32 PM on December 20, 2012: none

    I have this same problem on a linux box. Commenting out the #ifndef Q_OS_MAC in BitcoinGUI::createTrayIcon (and relative #endif) fixes the issue for me, which suggests that macro is defined when it should not be...

  12. strk commented at 3:36 PM on December 20, 2012: none

    Forget it, it still works after dropping the comments. There must be an issue with the dependency tracker which prevented my build to catch a recent fix

  13. Diapolo commented at 1:57 PM on January 8, 2013: none

    Any Mac dev, who can contribute here?

  14. gavinandresen closed this on Jan 23, 2013

  15. fanquake commented at 2:29 AM on January 24, 2013: member

    Has this been fixed?

  16. gavinandresen commented at 2:42 AM on January 24, 2013: contributor

    Works for me on OSX 10.8 using git HEAD. Please open a new issue if it doesn't work for you when 0.8 is out.

  17. Nerzahd commented at 4:38 PM on March 10, 2013: none

    With the new version 0.8 the GUI disappears completely again. I have to restart bitcoin-qt to bring it back. OSX 10.8.2 on three different computers. Others on the forum reported the same issue: https://bitcointalk.org/index.php?topic=145184.msg1582293#msg1582293

  18. gavinandresen reopened this on Mar 10, 2013

  19. fanquake cross-referenced this on Mar 11, 2013 from issue Mac Qt client (0.8.0-beta): main window cannot be restored after it is closed by L2G
  20. L2G commented at 9:12 AM on March 11, 2013: contributor

    I have observed this in OS X 10.7.5 as well, but to clarify: the window is irretrievable only after I hit the window-close button. If I hit the window-minimize button, the window minimizes as expected and can be restored in the usual way.

  21. strk commented at 9:23 AM on March 11, 2013: none

    Does this have to do with tray icon at all ? Do you have a tray icon ?

  22. L2G commented at 3:05 PM on March 11, 2013: contributor

    The closest equivalent to a system tray in Mac OS is the right-hand side of the menu bar. My Bitcoin-Qt does not put an icon in the menu bar.

    I played with the window options "Minimize to the tray instead of the taskbar" and "Minimize on close" to see if they had any effect, but they do not. Moreover, these settings do not appear to be retained in the Mac OS version.

    I found an older thread on the Qt Project forums that may or may not be relevant here: http://qt-project.org/forums/viewthread/2416

    I can work on doing builds on my machine if you are still in need of people who can make and test their own builds on Mac OS.

  23. gavinandresen commented at 3:42 PM on March 11, 2013: contributor

    RE: working on doing builds: yes, we need a Qt/OSX programmer. My main machine is OSX, but I spend most of my time working on lower-level code, not GUI stuff.

  24. L2G commented at 7:35 AM on March 12, 2013: contributor

    Okay. I was just able to run one of my own builds, so you can consider me at least a rookie QA engineer for Mac. :smile_cat:

  25. L2G commented at 3:17 PM on March 12, 2013: contributor

    Here would be one way to make a quickie fix. In BitcoinGUI::closeEvent is this block:

         if(clientModel)
         {
    #ifndef Q_OS_MAC // Ignored on Mac
             if(!clientModel->getOptionsModel()->getMinimizeToTray() &&
                !clientModel->getOptionsModel()->getMinimizeOnClose())
             {
                 qApp->quit();
             }
    #endif
         }
    

    Moving the #endif up by 3 lines would at least ensure that the app quits when the window-close button is clicked.

    However, I think I see some possibilities for enabling minimize-to-tray and minimize-on-close on Mac OS, so I'm going to play with those some more.

  26. Nerzahd commented at 12:47 PM on March 18, 2013: none

    if I change

    void BitcoinGUI::createTrayIcon()
    {
    #ifndef Q_OS_MAC
    trayIcon = new QSystemTrayIcon(this);
    
    trayIcon->setToolTip(tr("Bitcoin client"));
    trayIcon->setIcon(QIcon(":/icons/toolbar"));
    trayIcon->show();
    #endif
    

    to

    void BitcoinGUI::createTrayIcon()
    {
    trayIcon = new QSystemTrayIcon(this);
    #ifndef Q_OS_MAC
    
    trayIcon->setToolTip(tr("Bitcoin client"));
    trayIcon->setIcon(QIcon(":/icons/toolbar"));
    trayIcon->show();
    #endif
    

    the menu on the dockicon appears again.

  27. L2G commented at 5:23 PM on March 18, 2013: contributor

    For those watching at home, @Nerzahd moved #ifndef Q_OS_MAC down one line to keep trayIcon = new QSystemTrayIcon(this); from being excluded by the conditional.

    (I had to diff the two to figure out what was going on.) :grin:

  28. Diapolo commented at 8:40 PM on March 19, 2013: none

    I'm not sure why that patch helps on Mac really ^^. Can some Mac-capable dev enlighten me?

  29. L2G commented at 9:17 PM on March 19, 2013: contributor

    You have a point. At least this way the call the call to QSystemTrayIcon will get compiled into the Mac version, but without the call to trayIcon->show, it may be useless. I have a Mac and can try this out (just not right this moment).

    Wait, were you talking about @Nerzahd's patch or mine?

  30. Nerzahd commented at 10:16 PM on March 19, 2013: none

    i'm not a developer but i think it has something to do with:

    // Create system tray menu (or setup the dock menu) that late to prevent users from calling actions,
    // while the client has not yet fully loaded
    if(trayIcon)
        createTrayIconMenu();
    
  31. Diapolo commented at 10:30 PM on March 19, 2013: none

    createTrayIconMenu() on Mac should work without depending on trayIcon to be non-zero. Perhaps that is the problem why it works, when allowing trayIcon = new QSystemTrayIcon(this); on Mac.

    Solution could be to call createTrayIconMenu() on Mac always. Can a Mac dev try this?

    Edit: I created a patch, dunno if it works though ^^.

  32. Diapolo cross-referenced this on Mar 19, 2013 from issue Bitcoin-Qt: ensure createTrayIconMenu() is always called on Mac by Diapolo
  33. fanquake cross-referenced this on Apr 10, 2013 from issue Cannot re-open window. by samholmes
  34. jonasschnelli referenced this in commit b9d633bb70 on Apr 14, 2013
  35. jonasschnelli referenced this in commit cdee41c16b on Apr 15, 2013
  36. jonasschnelli referenced this in commit 89105af655 on Apr 15, 2013
  37. jonasschnelli referenced this in commit 4d17a1b0c2 on Apr 15, 2013
  38. laanwj closed this on Apr 27, 2013

  39. sipa cross-referenced this on May 9, 2013 from issue No way to re-open the window after closing it via the (x) button. (QT 0.8.1, Mac os 10.7x) by saltmaster
  40. kyledrake referenced this in commit b9183d6b72 on Jul 25, 2013
  41. magharees commented at 5:53 AM on February 24, 2014: none

    I have this problem on v0.8.6-beta Windows 7 professional x64

  42. laudney referenced this in commit 5e673ea0f1 on Mar 19, 2014
  43. laudney referenced this in commit 0d771031e0 on Mar 19, 2014
  44. laudney referenced this in commit 6882350494 on Mar 19, 2014
  45. suprnurd referenced this in commit 7b5556a294 on Dec 5, 2017
  46. lateminer referenced this in commit f231d566c7 on Jan 22, 2019
  47. lateminer referenced this in commit ab353d9848 on May 6, 2020
  48. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:56 UTC