void WebAppDeferredUpdateHandler::directRenderingActive(WindowedWebApp* app) { if (s_registeredApps.find(app) == s_registeredApps.end()) return; if (s_activeApp == app) return; //printf("%s: %p\n", __PRETTY_FUNCTION__, app); stopIdleUpdateTimer(); s_activeApp = app; s_nonActiveApps.clear(); s_nonActiveApps = s_registeredApps; s_nonActiveApps.erase(s_activeApp); resumeApp(s_activeApp); for (AppSet::const_iterator it = s_nonActiveApps.begin(); it != s_nonActiveApps.end(); ++it) { //printf("%s: suspending %p\n", __PRETTY_FUNCTION__, *it); suspendApp(*it); } }
void QX::terminateClicked() { if(process) { // because SIGTERM does not work on stopped process and we also give // program chance to terminate correctly (save data etc...) resumeApp(); process->terminate(); if(terminating && !process->waitForFinished(3000)) { process->kill(); } terminating = true; } else { close(); } }
void QX::resumeClicked() { //if (screen == QX::ScreenPaused) resumeApp(); }