void MaximizeState::onExit(QEvent* event) { CardWindowManagerState::onExit(event); CardWindow* activeWin = m_wm->activeWindow(); m_exiting = true; if(false == m_wm->isLastWindowAddedModal()) { if (activeWin) { activeWin->setMaxAndLoading(0); QRect r = m_wm->normalOrScreenBounds(0); resizeWindow(activeWin, r.width(), r.height()); if (!activeWin->removed()) m_wm->queueFocusAction(activeWin, false); SystemUiController::instance()->setDirectRenderingForWindow(SystemUiController::CARD_WINDOW_MANAGER, activeWin, false); activeWin->setAttachedToGroup(true); } // notify the system that we are no longer maximized SystemUiController::instance()->setCardWindowMaximized(false); SystemUiController::instance()->setMaximizedCardWindow(0); m_exiting = false; m_disableDirectRendering = 0; } }
void MaximizeState::finishMaximizingActiveWindow() { // set the active windows' size to the positive space CardWindow* activeWin = m_wm->activeWindow(); if(activeWin){ activeWin->setMaxAndLoading(1); } if (activeWin && activeWin->addedToWindowManager()) { // allow direct rendering if no one has requested it to be disabled - Do this only if the window is NOT a modal window if(WindowType::Type_ModalChildWindowCard != activeWin->type()) { const QRect& r = m_wm->targetPositiveSpace(); resizeWindow(activeWin, r.width(), r.height()); if (m_disableDirectRendering == 0) { if(false == m_wm->isModalDismissed()) { SystemUiController::instance()->setDirectRenderingForWindow(SystemUiController::CARD_WINDOW_MANAGER, activeWin, true); } else { m_wm->setModalDismissed(false); } } } if (G_UNLIKELY(Settings::LunaSettings()->perfTesting)) { // NOV-97107, hook for automated performance testing g_message("SYSMGR PERF: STATE MAXIMIZED appid: %s, processid: %s, type: %s, time: %d", activeWin->appId().c_str(), activeWin->processId().c_str(), activeWin->isHost() ? "host" : "card", Time::curTimeMs()); } } }