[Qt] fix debug console window handling when e.g. minimized #6288

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:show-rpconsole changing 3 files +21 −1
  1. Diapolo commented at 10:18 AM on June 16, 2015: none
    • this applies the same functionality we have for the main window
    • when the window was e.g. hidden and you clicked Help - Debug window, the window wasn't shown at all
  2. [Qt] fix debug console window handling when e.g. minimized
    - this applies the same functionality we have for the main window
    - when the window was e.g. hidden and you clicked Help - Debug window, the
      window wasn't shown at all
    b69df9e66e
  3. laanwj commented at 1:05 PM on June 16, 2015: member

    This is getting so incredibly complex. I'm afraid this will seem to fix issues but only add more edge cases (on some platforms). Do we really need all this code for every window? Are you sure we're not just mis-configuring something in Qt? Do other projects do this too?

  4. laanwj added the label GUI on Jun 16, 2015
  5. Diapolo commented at 1:09 PM on June 16, 2015: none

    A simple show() in the slot is not working, try for yourself. I also thought about at least having such a function in GUIUtil, but then we have problems with the signal/slot stuff as a widget id/pointer would be needed in showNormalIfMinimized(). Yes it's getting more complex, but fixes an UX issue. I'll try to see if we can do something better.

  6. Diapolo commented at 1:18 PM on June 16, 2015: none

    There is now nice or easy way to cover all cases that prevent a window from beeing shown (these cases is what we cover in showNormalIfMinimized().

    This also doesn't seem like the right thing to do: "This issue is not specific to Windows....I have the same issue on Linux. My solution was to close() the window before I re open() it."

    If I'm on peers tab I don't want to start at the first tab and a "remember selected" tab and settings would require more work that what this pull does IMHO.

  7. jonasschnelli commented at 3:22 PM on June 16, 2015: contributor

    Just tried the current master on window, osx and ubuntu and i can't see any issues with the debug window. What exactly to you intend to solve with this PR?

    when the window was e.g. hidden and you clicked Help - Debug window, the window wasn't shown at all

    Isn't it so, that when the main window is hidden you don't have a menu bar (at least in windows and linux)?

  8. fanquake commented at 7:21 PM on June 16, 2015: member

    I can't reproduce this either. Tested with 0.10.2 and master on OS X. Minimising or closing the main window, and then opening the debug menu from the menu bar works correctly.

  9. laanwj commented at 2:29 PM on June 18, 2015: member

    Indeed, this at least needs a clear list of steps to reproduce the problem. Otherwise I'd rather avoid it. In principle, Qt's default handling of windows should be good enough. For the main window we had to add some logic to handle e.g. actions being invoked through the dock menu, but that doesn't apply to the debug window.

  10. Diapolo commented at 1:46 PM on June 19, 2015: none

    Steps to reproduces the issue (tested on Win8.1 x64 - 0.10.2 x64):

    • leave client window open
    • click Help -> Debug Window
    • minimize client and Debug Window via Windows "show deskop" command (e.g by clicking taskbar and choosing the option)
    • try to use system tray to re-show Debug Window

    expected:

    • Debug Window is shown result:
    • Debug Window is NOT shown

    There was a change of the type we use for the debug Window, but even with current master the problem is there. You can just replace the Windows function to show the desktop with just minimizing the Debug Window and click Help -> Debug Window... it isn't shown then.

  11. jonasschnelli commented at 7:52 PM on June 19, 2015: contributor

    This indeed fixes an debug-window-reopening issue on OSX. Could not reproduce on linux (there the handling seems to be okay).

    Is there a way to reuse the current code instead of copying? Maybe factor out to guiutils?

  12. Diapolo commented at 7:59 PM on June 19, 2015: none

    Thanks for verifying the bug! I also thought about reusing the code in GUIUtil as I said, but I have no idea if this is possible due to the use in signal/slot parts... if a triggered() is received how should I pass a widget id or something like that?

    Edit: The issue :-P...

  13. jonasschnelli commented at 8:02 PM on June 19, 2015: contributor

    Wouldn't say that this is fixes a "bug".

    Subclassing would be a way if they would be inherited from the same class. But they're not.

  14. luke-jr commented at 6:28 AM on June 23, 2015: member

    To reproduce the bug in KDE:

    • leave client window open
    • click Help -> Debug Window
    • switch to a different virtual desktop
    • try to use system tray to re-show Debug Window

    However, this b69df9e66e14518d34f8b0598036549846a4f16d does not fix the issue for me. It merely changes it. Instead of getting nothing at all, it now changes to the original virtual desktop I left the debug window open on. Expected behaviour would be to show it on the current virtual desktop.

  15. penguin1333 commented at 5:46 PM on June 23, 2015: none

    I was able to reproduce in KDE thanks to @luke-jr, and the same story for me. It doesn't fix it.

    It needs a little work, but I get the intentions you have with this.

  16. Diapolo commented at 7:22 PM on June 23, 2015: none

    @luke-jr @prestotron Well on Windows I don't have a virtual desktop or such, so I'm unable to test it :-/. I'm just asing but do you also have such an issue with our main window when re-opening via the tray icon?

  17. luke-jr commented at 8:26 PM on June 23, 2015: member

    @Diapolo The main window has a different bug in this area: after you change virtual desktops, it vanishes entirely, even on the desktop you left it open on. Reopening it works fine on any virtual desktop, however.

  18. penguin1333 commented at 8:48 PM on June 23, 2015: none

    I would say something, but @luke-jr explained it very well :)

  19. jgarzik commented at 1:55 PM on September 16, 2015: contributor

    Status? This sounds like it's in a state of "heading towards a useful fix" so closing seems unwarranted.

  20. fanquake commented at 1:57 PM on September 16, 2015: member

    @jgarzik Could be superseded by #6653

  21. MarcoFalke commented at 10:19 AM on September 26, 2015: member

    @luke-jr, @aceriocam: Instead of getting nothing at all, it now changes to the original virtual desktop I left the debug window open on. Expected behaviour would be to show it on the current virtual desktop.

    As #6653 got merged, this PR looks superseded. Would you mind filing a issue about the virtual desktop thing so it does not get lost when this PR gets closed?

  22. Diapolo closed this on Oct 9, 2015

  23. Diapolo deleted the branch on Oct 9, 2015
  24. 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: 2026-04-17 09:15 UTC

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