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 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...

  11. 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

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

    Any Mac dev, who can contribute here?

  13. gavinandresen closed this on Jan 23, 2013

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

    Has this been fixed?

  15. 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.

  16. 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

  17. gavinandresen reopened this on Mar 10, 2013

  18. 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.

  19. 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 ?

  20. 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.

  21. 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.

  22. 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:

  23. 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.

  24. 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.

  25. 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:

  26. 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?

  27. 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?

  28. 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();
    
  29. 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 ^^.

  30. jonasschnelli referenced this in commit b9d633bb70 on Apr 14, 2013
  31. jonasschnelli referenced this in commit cdee41c16b on Apr 15, 2013
  32. jonasschnelli referenced this in commit 89105af655 on Apr 15, 2013
  33. jonasschnelli referenced this in commit 4d17a1b0c2 on Apr 15, 2013
  34. laanwj closed this on Apr 27, 2013

  35. kyledrake referenced this in commit b9183d6b72 on Jul 25, 2013
  36. magharees commented at 5:53 AM on February 24, 2014: none

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

  37. laudney referenced this in commit 5e673ea0f1 on Mar 19, 2014
  38. laudney referenced this in commit 0d771031e0 on Mar 19, 2014
  39. laudney referenced this in commit 6882350494 on Mar 19, 2014
  40. suprnurd referenced this in commit 7b5556a294 on Dec 5, 2017
  41. lateminer referenced this in commit f231d566c7 on Jan 22, 2019
  42. lateminer referenced this in commit ab353d9848 on May 6, 2020
  43. DrahtBot 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-04-14 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me