Changeset View
Changeset View
Standalone View
Standalone View
manage.cpp
Show First 20 Lines • Show All 426 Lines • ▼ Show 20 Line(s) | 426 | if (init_minimize && isTransient()) { | |||
---|---|---|---|---|---|
427 | auto mainclients = mainClients(); | 427 | auto mainclients = mainClients(); | ||
428 | for (auto it = mainclients.constBegin(); | 428 | for (auto it = mainclients.constBegin(); | ||
429 | it != mainclients.constEnd(); | 429 | it != mainclients.constEnd(); | ||
430 | ++it) | 430 | ++it) | ||
431 | if ((*it)->isShown(true)) | 431 | if ((*it)->isShown(true)) | ||
432 | init_minimize = false; // SELI TODO: Even e.g. for NET::Utility? | 432 | init_minimize = false; // SELI TODO: Even e.g. for NET::Utility? | ||
433 | } | 433 | } | ||
434 | // If a dialog is shown for minimized window, minimize it too | 434 | // If a dialog is shown for minimized window, minimize it too | ||
435 | if (!init_minimize && isTransient() && mainClients().count() > 0 && !workspace()->sessionSaving()) { | 435 | if (!init_minimize && isTransient() && mainClients().count() > 0 && | ||
436 | workspace()->sessionManager()->state() != SessionState::Saving) { | ||||
436 | bool visible_parent = false; | 437 | bool visible_parent = false; | ||
437 | // Use allMainClients(), to include also main clients of group transients | 438 | // Use allMainClients(), to include also main clients of group transients | ||
438 | // that have been optimized out in X11Client::checkGroupTransients() | 439 | // that have been optimized out in X11Client::checkGroupTransients() | ||
439 | auto mainclients = allMainClients(); | 440 | auto mainclients = allMainClients(); | ||
440 | for (auto it = mainclients.constBegin(); | 441 | for (auto it = mainclients.constBegin(); | ||
441 | it != mainclients.constEnd(); | 442 | it != mainclients.constEnd(); | ||
442 | ++it) | 443 | ++it) | ||
443 | if ((*it)->isShown(true)) | 444 | if ((*it)->isShown(true)) | ||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Line(s) | 527 | if (isShown(true)) { | |||
527 | bool allow; | 528 | bool allow; | ||
528 | if (session) | 529 | if (session) | ||
529 | allow = session->active && | 530 | allow = session->active && | ||
530 | (!workspace()->wasUserInteraction() || workspace()->activeClient() == nullptr || | 531 | (!workspace()->wasUserInteraction() || workspace()->activeClient() == nullptr || | ||
531 | workspace()->activeClient()->isDesktop()); | 532 | workspace()->activeClient()->isDesktop()); | ||
532 | else | 533 | else | ||
533 | allow = workspace()->allowClientActivation(this, userTime(), false); | 534 | allow = workspace()->allowClientActivation(this, userTime(), false); | ||
534 | 535 | | |||
536 | const bool isSessionSaving = workspace()->sessionManager()->state() == SessionState::Saving; | ||||
537 | | ||||
535 | // If session saving, force showing new windows (i.e. "save file?" dialogs etc.) | 538 | // If session saving, force showing new windows (i.e. "save file?" dialogs etc.) | ||
536 | // also force if activation is allowed | 539 | // also force if activation is allowed | ||
537 | if( !isOnCurrentDesktop() && !isMapped && !session && ( allow || workspace()->sessionSaving() )) | 540 | if( !isOnCurrentDesktop() && !isMapped && !session && ( allow || isSessionSaving )) | ||
538 | VirtualDesktopManager::self()->setCurrent( desktop()); | 541 | VirtualDesktopManager::self()->setCurrent( desktop()); | ||
539 | 542 | | |||
540 | // If the window is on an inactive activity during session saving, temporarily force it to show. | 543 | // If the window is on an inactive activity during session saving, temporarily force it to show. | ||
541 | if( !isMapped && !session && workspace()->sessionSaving() && !isOnCurrentActivity()) { | 544 | if( !isMapped && !session && isSessionSaving && !isOnCurrentActivity()) { | ||
542 | setSessionActivityOverride( true ); | 545 | setSessionActivityOverride( true ); | ||
543 | foreach( AbstractClient* c, mainClients()) { | 546 | foreach( AbstractClient* c, mainClients()) { | ||
544 | if (X11Client *mc = dynamic_cast<X11Client *>(c)) { | 547 | if (X11Client *mc = dynamic_cast<X11Client *>(c)) { | ||
545 | mc->setSessionActivityOverride(true); | 548 | mc->setSessionActivityOverride(true); | ||
546 | } | 549 | } | ||
547 | } | 550 | } | ||
548 | } | 551 | } | ||
549 | 552 | | |||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |