Changeset View
Changeset View
Standalone View
Standalone View
manage.cpp
Context not available. | |||||
596 | else | 596 | else | ||
---|---|---|---|---|---|
597 | allow = workspace()->allowClientActivation(this, userTime(), false); | 597 | allow = workspace()->allowClientActivation(this, userTime(), false); | ||
598 | 598 | | |||
599 | if (!(isMapped || session)) { | 599 | // If session saving, force showing new windows (i.e. "save file?" dialogs etc.) | ||
600 | if (workspace()->sessionSaving()) { | 600 | // also force if activation is allowed | ||
601 | /* | 601 | if( !isOnCurrentDesktop() && !isMapped && !session && ( allow || workspace()->sessionSaving() )) | ||
602 | * If we get a new window during session saving, we assume it's some 'save file?' dialog | 602 | VirtualDesktopManager::self()->setCurrent( desktop()); | ||
603 | * which the user really needs to see (to know why logout's stalled). | | |||
604 | * | | |||
605 | * Given the current session management protocol, I can't see a nicer way of doing this. | | |||
606 | * Someday I'd like to see a protocol that tells the windowmanager who's doing SessionInteract. | | |||
607 | */ | | |||
608 | needsSessionInteract = true; | | |||
609 | //show the parent too | | |||
610 | auto mainclients = mainClients(); | | |||
611 | for (auto it = mainclients.constBegin(); | | |||
612 | it != mainclients.constEnd(); ++it) { | | |||
613 | if (Client *mc = dynamic_cast<Client*>((*it))) { | | |||
614 | mc->setSessionInteract(true); | | |||
615 | } | | |||
616 | (*it)->unminimize(); | | |||
617 | } | | |||
618 | } else if (allow) { | | |||
619 | // also force if activation is allowed | | |||
620 | if (!isOnCurrentDesktop() && options->focusPolicyIsReasonable()) { | | |||
621 | VirtualDesktopManager::self()->setCurrent(desktop()); | | |||
622 | } | | |||
623 | /*if (!isOnCurrentActivity()) { | | |||
624 | workspace()->setCurrentActivity( activities().first() ); | | |||
625 | } FIXME no such method*/ | | |||
626 | } | | |||
627 | } | | |||
628 | 603 | | |||
629 | if (isOnCurrentDesktop() && !isMapped && !allow && (!session || session->stackingOrder < 0)) | 604 | if (isOnCurrentDesktop() && !isMapped && !allow && (!session || session->stackingOrder < 0)) | ||
630 | workspace()->restackClientUnderActive(this); | 605 | workspace()->restackClientUnderActive(this); | ||
Context not available. |