#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 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) 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 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. -- Ticket URL: <https://dev.haiku-os.org/ticket/10826#comment:4> Haiku <https://dev.haiku-os.org> Haiku - the operating system.