Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOINC Manager exits completely when closing minimised window. #5164

Closed
kotenok2000 opened this issue Mar 22, 2023 · 11 comments · Fixed by #5174
Closed

BOINC Manager exits completely when closing minimised window. #5164

kotenok2000 opened this issue Mar 22, 2023 · 11 comments · Fixed by #5174
Labels
C: Manager Newbie Suitable for a new contributor P: Trivial

Comments

@kotenok2000
Copy link

Describe the bug
A clear and concise description of what the bug is.

Steps To Reproduce

  1. Open boinc manager window.
  2. Minimize it.
  3. Hover over it.
  4. Close window with middle mouse button.

Expected behavior
A clear and concise description of what you expected to happen.
Boinc window closes without killing boincmgr.exe
Screenshots
If applicable, add screenshots to help explain your problem.
image
image
System Information

  • OS: Microsoft Windows [Version 10.0.22621.1413]
  • BOINC Version: 7.22.0

Additional context
Add any other context about the problem here.
This issue was seen even on 6.10.48
https://boinc.berkeley.edu/forum_thread.php?id=11667&postid=79148

@AenBleidd AenBleidd added C: Manager P: Trivial T: Defect Newbie Suitable for a new contributor labels Mar 23, 2023
@AenBleidd AenBleidd added this to the Client/Manager 7.24.0 milestone Mar 23, 2023
@BrianNixon
Copy link
Contributor

This behaviour has been deliberately implemented (for Windows in 2b5630c): if the top-level window is closed when minimised, CBOINCBaseFrame::OnClose() destroys it, which will exit the application.

Anyone know the history/​rationale?

@RichardHaselgrove
Copy link
Contributor

Under Windows, 'closing' the Manager window actually minimises it to the notification area (system tray). Right-clicking the icon - most Windows users don't have a middle button - brings up a context menu with an entry for 'Exit' - there's no point in closing it further, since it's already been closed. There's a conscious difference in the Windows implementation between "close" and "exit", but it doesn't necessarily translate easily to the other operating systems.

@kotenok2000
Copy link
Author

kotenok2000 commented Mar 29, 2023

Mouse wheel works as button when pressed.

@RichardHaselgrove
Copy link
Contributor

Windows doesn't show a taskbar icon when the window is closed/minimised - or didn't, with the versions current when this feature was implemented (mostly Windows 7). Windows 10, and in particular 11, may have changed that.

@kotenok2000
Copy link
Author

kotenok2000 commented Mar 29, 2023

Taskbar displays classic context menu when i hold shift and right click or right click aero preview.
image

@BrianNixon
Copy link
Contributor

We need to be careful with terminology here.

In BOINC Manager’s normal case, selecting ‘Close’ does not close or minimise the window; it hides it (with the side-effect of also removing the taskbar button), but the application continues running.

Minimised (a.k.a. iconised) top-level windows do have taskbar buttons.

The fact here is that the code makes a special case of a request to close a minimised window, and causes the application to exit. The discussion is whether or not that is the right thing to do (for any or all window systems).

[also minimized and iconized, for the benefit of anybody searching for the en-⁠US spellings]

@RichardHaselgrove
Copy link
Contributor

Indeed - we do have to be careful with terminology, and with interpreting the implications of user actions.

Let's concentrate on Windows, and use your word hidden for the minimal-footprint case.

Under Windows XP, a BOINC Manager icon was always visible in the system tray when the main window was hidden.

With the change to a 'notification area' under Windows 7, the icon was always available, but was set by default to "Only show notifications" - it popped into view whenever a notice reminder was displayed, but was invisible otherwise. Windows 7 provides a clear and simple user interface for changing the default mode to "Show icon and notifications", which makes it permanently visible again.

Under Windows 10 and 11, it has become increasingly difficult to force the display mode into "Icon always visible" mode. And with some iterations of the development of the new interfaces, users have reported problems in re-displaying the full manager window when it's hidden and icon-free. By default, BOINC only allows one copy of the Manager to be active at the same time: re-launching the application fails, because the hidden copy is still active - but Windows hasn't always restored and given focus to the running copy instead.

It's a version-control minefield, and should only be meddled-with after full consideration of all of the above. You did ask if anyone knew the history!

@BrianNixon
Copy link
Contributor

All good stuff; thanks. But the issue here is nothing to do with the notification area icon.

Perhaps the question is better phrased as: “Under what circumstances should BOINC Manager exit?”

@BrianNixon
Copy link
Contributor

Intricacies of the notification area aside, the Manager behaviour on Windows is clearly inconsistent. The ‘Close’ action should have the same effect, whichever method is used to make it happen.

PR #5174 fixes this for Windows while preserving the existing behaviour on Mac (exit if minimised, otherwise hide, per be2b680) and GTK (always exit, never hide).

@davidpanderson
Copy link
Contributor

We've always had the problem that the Manager and the client are separate programs,
and "Exit BOINC" is ambiguous - does it exit one or both?

@BrianNixon
Copy link
Contributor

The “unwanted” exit under discussion here is a fast path out of the Manager only: the Exit Confirmation dialog is not shown, and the client remains running (regardless of stored preferences). The (only?) user-visible effect of the exit is that the notification area icon is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Manager Newbie Suitable for a new contributor P: Trivial
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants