#10826: "Close all" from another workspace does not show user unload hook message -------------------------------------+---------------------------- Reporter: Kev | Owner: jackburton Type: bug | Status: new Priority: normal | Milestone: R1 Component: Applications/Terminal | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: x86 -------------------------------------+---------------------------- Comment (by Kev): Replying to [comment:4 pulkomandy]: > The API already supports this: > - The application QuitRequested method is called. This is where we pop the alert up. > - The method return a boolean to indicate that the app can be closed or not (cancelling the quit request, or allowing it to continue) Interesting! That's good. > It is currently up to the app to make sure the user gets to see the alert. This is tricky with the current multi-launch terminal because it goes this way: > - DeskBar sends the quit request to all terminal apps > - All window pop the QuitRequested message at the same time > - They all try to switch to their own workspace > - Only one of them wins So it was right to make it a Terminal thing after all. Now, this is where my report is maybe actually about two bugs: there is still something not working right if you only have one single Terminal window open, and try to "Close All" from another workspace. It doesn't change workspaces. By extension the multi-Terminal-workspace situation is also not working right --none of them win, because the workspace doesn't switch to any of them. > With a single launch terminal it would work better: > - Deskbar sends the quit request to the unique terminal app > - The app iterates over all the windows and call their QuitRequested hook (this is the default implementation of BApplication::QuitRequested) > - So the windows get to show their alert one after another, not all at the same time, they can safely grab the user attention by switching workspaces > - If a window has no running app, it can be quit without popping the alert or switching worksapces > - If the user cancels the shutdown at one window, the process stops there, there is no alert for remaining windows. If you have a single launch, though, and some program in a Terminal crashes (say like in #10504 ), does it take all your Terminal windows with it? -- Ticket URL: <https://dev.haiku-os.org/ticket/10826#comment:5> Haiku <https://dev.haiku-os.org> Haiku - the operating system.