Changeset View
Changeset View
Standalone View
Standalone View
manage.cpp
Show First 20 Lines • Show All 438 Lines • ▼ Show 20 Line(s) | 438 | if (init_minimize && isTransient()) { | |||
---|---|---|---|---|---|
439 | auto mainclients = mainClients(); | 439 | auto mainclients = mainClients(); | ||
440 | for (auto it = mainclients.constBegin(); | 440 | for (auto it = mainclients.constBegin(); | ||
441 | it != mainclients.constEnd(); | 441 | it != mainclients.constEnd(); | ||
442 | ++it) | 442 | ++it) | ||
443 | if ((*it)->isShown(true)) | 443 | if ((*it)->isShown(true)) | ||
444 | init_minimize = false; // SELI TODO: Even e.g. for NET::Utility? | 444 | init_minimize = false; // SELI TODO: Even e.g. for NET::Utility? | ||
445 | } | 445 | } | ||
446 | // If a dialog is shown for minimized window, minimize it too | 446 | // If a dialog is shown for minimized window, minimize it too | ||
447 | if (!init_minimize && isTransient() && mainClients().count() > 0 && !workspace()->sessionSaving()) { | 447 | if (!init_minimize && isTransient() && mainClients().count() > 0 && | ||
448 | workspace()->sessionManager()->state() != SessionState::Saving) { | ||||
448 | bool visible_parent = false; | 449 | bool visible_parent = false; | ||
449 | // Use allMainClients(), to include also main clients of group transients | 450 | // Use allMainClients(), to include also main clients of group transients | ||
450 | // that have been optimized out in X11Client::checkGroupTransients() | 451 | // that have been optimized out in X11Client::checkGroupTransients() | ||
451 | auto mainclients = allMainClients(); | 452 | auto mainclients = allMainClients(); | ||
452 | for (auto it = mainclients.constBegin(); | 453 | for (auto it = mainclients.constBegin(); | ||
453 | it != mainclients.constEnd(); | 454 | it != mainclients.constEnd(); | ||
454 | ++it) | 455 | ++it) | ||
455 | if ((*it)->isShown(true)) | 456 | if ((*it)->isShown(true)) | ||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Line(s) | 539 | if (isShown(true)) { | |||
539 | bool allow; | 540 | bool allow; | ||
540 | if (session) | 541 | if (session) | ||
541 | allow = session->active && | 542 | allow = session->active && | ||
542 | (!workspace()->wasUserInteraction() || workspace()->activeClient() == nullptr || | 543 | (!workspace()->wasUserInteraction() || workspace()->activeClient() == nullptr || | ||
543 | workspace()->activeClient()->isDesktop()); | 544 | workspace()->activeClient()->isDesktop()); | ||
544 | else | 545 | else | ||
545 | allow = workspace()->allowClientActivation(this, userTime(), false); | 546 | allow = workspace()->allowClientActivation(this, userTime(), false); | ||
546 | 547 | | |||
548 | const bool isSessionSaving = workspace()->sessionManager()->state() == SessionState::Saving; | ||||
549 | | ||||
547 | // If session saving, force showing new windows (i.e. "save file?" dialogs etc.) | 550 | // If session saving, force showing new windows (i.e. "save file?" dialogs etc.) | ||
548 | // also force if activation is allowed | 551 | // also force if activation is allowed | ||
549 | if( !isOnCurrentDesktop() && !isMapped && !session && ( allow || workspace()->sessionSaving() )) | 552 | if( !isOnCurrentDesktop() && !isMapped && !session && ( allow || isSessionSaving )) | ||
550 | VirtualDesktopManager::self()->setCurrent( desktop()); | 553 | VirtualDesktopManager::self()->setCurrent( desktop()); | ||
551 | 554 | | |||
552 | // If the window is on an inactive activity during session saving, temporarily force it to show. | 555 | // If the window is on an inactive activity during session saving, temporarily force it to show. | ||
553 | if( !isMapped && !session && workspace()->sessionSaving() && !isOnCurrentActivity()) { | 556 | if( !isMapped && !session && isSessionSaving && !isOnCurrentActivity()) { | ||
554 | setSessionActivityOverride( true ); | 557 | setSessionActivityOverride( true ); | ||
555 | foreach( AbstractClient* c, mainClients()) { | 558 | foreach( AbstractClient* c, mainClients()) { | ||
556 | if (X11Client *mc = dynamic_cast<X11Client *>(c)) { | 559 | if (X11Client *mc = dynamic_cast<X11Client *>(c)) { | ||
557 | mc->setSessionActivityOverride(true); | 560 | mc->setSessionActivityOverride(true); | ||
558 | } | 561 | } | ||
559 | } | 562 | } | ||
560 | } | 563 | } | ||
561 | 564 | | |||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |