[Qt] fix a bug where the SplashScreen will not be hidden during startup #8231

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2016/06/qt_min_fix changing 1 files +5 −0
  1. jonasschnelli commented at 8:57 am on June 21, 2016: contributor

    Fixes #7718

    I guess calling QWidget::hide() on a QWidget::isMinimized() will not always result in a hidden window. It’s hard to say if this is a bug or a feature.

    This little PR will make sure, we de-minimize the splashscreen-window before hiding.

  2. jonasschnelli added the label GUI on Jun 21, 2016
  3. laanwj commented at 9:22 am on June 21, 2016: member

    Though this doesn’t hurt, this sounds like an upstream Qt bug to me. Hide should hide no matter what the other window flags are.

    Does this happen with all Qt versions?

  4. [Qt] fix a bug where the SplashScreen will not be hidden during startup b3e1348c46
  5. in src/qt/splashscreen.cpp: in 3452dcc1fb outdated
    140@@ -141,6 +141,8 @@ SplashScreen::~SplashScreen()
    141 void SplashScreen::slotFinish(QWidget *mainWin)
    142 {
    143     Q_UNUSED(mainWin);
    144+    if (isMinimized())
    


    laanwj commented at 9:23 am on June 21, 2016:
    Please add a comment why this is being done
  6. jonasschnelli force-pushed on Jun 21, 2016
  7. jonasschnelli commented at 9:37 am on June 21, 2016: contributor
    I haven’t looked at the Qt code. But I could understand the argument that a minimized window is hidden fro the user perspective (but not closed). For the API perspective, I guess we should do a showNormal() before hide().
  8. jonasschnelli commented at 9:37 am on June 21, 2016: contributor
    Added a comment.
  9. laanwj commented at 9:49 am on June 21, 2016: member

    But I could understand the argument that a minimized window is hidden fro the user perspective (but not closed)

    But at least up until now, in Qt, hidden really meant hidden. As in: seem closed and be complete inaccessible from the user perspective. A lot of code relies on that being the case.

    I’m kind of disappointed about Qt if this is on purpose. Managing window state becomes more and more complex (see how many of the lines of bitcoingui.cpp are spent on just that…).

  10. laanwj merged this on Jun 22, 2016
  11. laanwj closed this on Jun 22, 2016

  12. laanwj referenced this in commit 760a6c7cb2 on Jun 22, 2016
  13. laanwj commented at 6:50 am on June 22, 2016: member
    utACK b3e1348
  14. codablock referenced this in commit eed5fe4160 on Sep 7, 2017
  15. UdjinM6 referenced this in commit 9707ca5cea on Sep 9, 2017
  16. weerayut3 commented at 7:54 am on December 5, 2018: none
    / *ถ้าหน้าต่างถูกย่อเล็กสุด hide () จะถูกละเลย * /
    / *ตรวจสอบให้แน่ใจว่าเรายกเลิกการย่อหน้าต่างสาดก่อนที่จะซ่อน* /
    if ( isMinimized ())
        showNormal ();
    ซ่อน ();
    

    }

  17. MarcoFalke 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: 2024-12-19 00:12 UTC

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