Changeset 88657 in vbox
- Timestamp:
- Apr 22, 2021 3:11:09 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r88656 r88657 4081 4081 { 4082 4082 /* Make sure QApplication cleanup us on exit: */ 4083 qApp->setFallbackSessionManagementEnabled(false); 4083 4084 connect(qApp, &QGuiApplication::aboutToQuit, 4084 4085 this, &UICommon::cleanup); … … 4699 4700 #endif 4700 4701 4701 /* Ask session manager to postpone shutdown until we done: */ 4702 manager.cancel(); 4702 /* Depending on UI type: */ 4703 switch (uiType()) 4704 { 4705 /* For Runtime UI: */ 4706 case UIType_RuntimeUI: 4707 { 4708 // WORKAROUND: 4709 // We can't save VM state in one go, so we have to ask session manager to postpone shutdown until we done.. 4710 manager.cancel(); 4703 4711 4704 4712 #ifdef VBOX_WS_WIN 4705 // WORKAROUND:4706 // In theory that's Qt5 who should allow us to provide postponing reason as well,4707 // but that functionality seems missed in Windows platform plugin, so we are making that ourselves.4708 // That also implies that since we had postponed a shutdown process, host will send us WM_QUIT to4709 // allow to properly do an applicationcleanup first. That signal will cause QApplication to quit().4710 ShutdownBlockReasonCreateAPI((HWND)windowManager().mainWindowShown()->winId(), L"Shutdown in progress...");4713 // WORKAROUND: 4714 // In theory that's Qt5 who should allow us to provide postponing reason as well, but that functionality 4715 // seems missed in Windows platform plugin, so we are making that ourselves. That also implies that since 4716 // we had postponed a shutdown process, host will send us WM_QUIT to allow to properly do an application 4717 // cleanup first. That signal will cause QApplication to quit(). 4718 ShutdownBlockReasonCreateAPI((HWND)windowManager().mainWindowShown()->winId(), L"Shutdown in progress..."); 4711 4719 #endif 4720 4721 break; 4722 } 4723 default: 4724 break; 4725 } 4712 4726 } 4713 4727 #endif /* VBOX_GUI_WITH_CUSTOMIZATIONS1 */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIStarter.cpp
r88656 r88657 167 167 168 168 #ifdef VBOX_RUNTIME_UI 169 /* Temporary override the default close action to 'SaveState' if necessary: */ 170 if (gpMachine->uisession()->defaultCloseAction() == MachineCloseAction_Invalid) 171 gpMachine->uisession()->setDefaultCloseAction(MachineCloseAction_SaveState); 169 gpMachine->uisession()->saveState(); 172 170 #endif 173 171 }
Note:
See TracChangeset
for help on using the changeset viewer.