Changeset View
Changeset View
Standalone View
Standalone View
manage.cpp
Show First 20 Lines • Show All 217 Lines • ▼ Show 20 Line(s) | 217 | if ((*it)->isOnCurrentDesktop()) | |||
---|---|---|---|---|---|
218 | on_current = true; | 218 | on_current = true; | ||
219 | if ((*it)->isOnAllDesktops()) | 219 | if ((*it)->isOnAllDesktops()) | ||
220 | on_all = true; | 220 | on_all = true; | ||
221 | } | 221 | } | ||
222 | if (on_all) | 222 | if (on_all) | ||
223 | desk = NET::OnAllDesktops; | 223 | desk = NET::OnAllDesktops; | ||
224 | else if (on_current) | 224 | else if (on_current) | ||
225 | desk = VirtualDesktopManager::self()->current(); | 225 | desk = VirtualDesktopManager::self()->current(); | ||
226 | else if (maincl != NULL) | 226 | else if (maincl != nullptr) | ||
227 | desk = maincl->desktop(); | 227 | desk = maincl->desktop(); | ||
228 | 228 | | |||
229 | if (maincl) | 229 | if (maincl) | ||
230 | setOnActivities(maincl->activities()); | 230 | setOnActivities(maincl->activities()); | ||
231 | } else { // a transient shall appear on its leader and not drag that around | 231 | } else { // a transient shall appear on its leader and not drag that around | ||
232 | if (info->desktop()) | 232 | if (info->desktop()) | ||
233 | desk = info->desktop(); // Window had the initial desktop property, force it | 233 | desk = info->desktop(); // Window had the initial desktop property, force it | ||
234 | if (desktop() == 0 && asn_valid && asn_data.desktop() != 0) | 234 | if (desktop() == 0 && asn_valid && asn_data.desktop() != 0) | ||
▲ Show 20 Lines • Show All 277 Lines • ▼ Show 20 Line(s) | 511 | if (info->state() & NET::Modal) | |||
512 | setModal(true); | 512 | setModal(true); | ||
513 | 513 | | |||
514 | setFullScreen(rules()->checkFullScreen(info->state() & NET::FullScreen, !isMapped), false); | 514 | setFullScreen(rules()->checkFullScreen(info->state() & NET::FullScreen, !isMapped), false); | ||
515 | } | 515 | } | ||
516 | 516 | | |||
517 | updateAllowedActions(true); | 517 | updateAllowedActions(true); | ||
518 | 518 | | |||
519 | // Set initial user time directly | 519 | // Set initial user time directly | ||
520 | m_userTime = readUserTimeMapTimestamp(asn_valid ? &asn_id : NULL, asn_valid ? &asn_data : NULL, session); | 520 | m_userTime = readUserTimeMapTimestamp(asn_valid ? &asn_id : nullptr, asn_valid ? &asn_data : nullptr, session); | ||
521 | group()->updateUserTime(m_userTime); // And do what Client::updateUserTime() does | 521 | group()->updateUserTime(m_userTime); // And do what Client::updateUserTime() does | ||
522 | 522 | | |||
523 | // This should avoid flicker, because real restacking is done | 523 | // This should avoid flicker, because real restacking is done | ||
524 | // only after manage() finishes because of blocking, but the window is shown sooner | 524 | // only after manage() finishes because of blocking, but the window is shown sooner | ||
525 | m_frame.lower(); | 525 | m_frame.lower(); | ||
526 | if (session && session->stackingOrder != -1) { | 526 | if (session && session->stackingOrder != -1) { | ||
527 | sm_stacking_order = session->stackingOrder; | 527 | sm_stacking_order = session->stackingOrder; | ||
528 | workspace()->restoreSessionStackingOrder(this); | 528 | workspace()->restoreSessionStackingOrder(this); | ||
529 | } | 529 | } | ||
530 | 530 | | |||
531 | if (compositing()) | 531 | if (compositing()) | ||
532 | // Sending ConfigureNotify is done when setting mapping state below, | 532 | // Sending ConfigureNotify is done when setting mapping state below, | ||
533 | // Getting the first sync response means window is ready for compositing | 533 | // Getting the first sync response means window is ready for compositing | ||
534 | sendSyncRequest(); | 534 | sendSyncRequest(); | ||
535 | else | 535 | else | ||
536 | ready_for_painting = true; // set to true in case compositing is turned on later. bug #160393 | 536 | ready_for_painting = true; // set to true in case compositing is turned on later. bug #160393 | ||
537 | 537 | | |||
538 | if (isShown(true)) { | 538 | if (isShown(true)) { | ||
539 | bool allow; | 539 | bool allow; | ||
540 | if (session) | 540 | if (session) | ||
541 | allow = session->active && | 541 | allow = session->active && | ||
542 | (!workspace()->wasUserInteraction() || workspace()->activeClient() == NULL || | 542 | (!workspace()->wasUserInteraction() || workspace()->activeClient() == nullptr || | ||
543 | workspace()->activeClient()->isDesktop()); | 543 | workspace()->activeClient()->isDesktop()); | ||
544 | else | 544 | else | ||
545 | allow = workspace()->allowClientActivation(this, userTime(), false); | 545 | allow = workspace()->allowClientActivation(this, userTime(), false); | ||
546 | 546 | | |||
547 | // If session saving, force showing new windows (i.e. "save file?" dialogs etc.) | 547 | // If session saving, force showing new windows (i.e. "save file?" dialogs etc.) | ||
548 | // also force if activation is allowed | 548 | // also force if activation is allowed | ||
549 | if( !isOnCurrentDesktop() && !isMapped && !session && ( allow || workspace()->sessionSaving() )) | 549 | if( !isOnCurrentDesktop() && !isMapped && !session && ( allow || workspace()->sessionSaving() )) | ||
550 | VirtualDesktopManager::self()->setCurrent( desktop()); | 550 | VirtualDesktopManager::self()->setCurrent( desktop()); | ||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | |||||
601 | connect(Compositor::self(), &Compositor::compositingToggled, this, | 601 | connect(Compositor::self(), &Compositor::compositingToggled, this, | ||
602 | [this](bool active) { | 602 | [this](bool active) { | ||
603 | if (active) { | 603 | if (active) { | ||
604 | return; | 604 | return; | ||
605 | } | 605 | } | ||
606 | if (opacity() == 1.0) { | 606 | if (opacity() == 1.0) { | ||
607 | return; | 607 | return; | ||
608 | } | 608 | } | ||
609 | NETWinInfo info(connection(), frameId(), rootWindow(), 0, 0); | 609 | NETWinInfo info(connection(), frameId(), rootWindow(), nullptr, nullptr); | ||
610 | info.setOpacity(static_cast<unsigned long>(opacity() * 0xffffffff)); | 610 | info.setOpacity(static_cast<unsigned long>(opacity() * 0xffffffff)); | ||
611 | } | 611 | } | ||
612 | ); | 612 | ); | ||
613 | 613 | | |||
614 | // TODO: there's a small problem here - isManaged() depends on the mapping state, | 614 | // TODO: there's a small problem here - isManaged() depends on the mapping state, | ||
615 | // but this client is not yet in Workspace's client list at this point, will | 615 | // but this client is not yet in Workspace's client list at this point, will | ||
616 | // be only done in addClient() | 616 | // be only done in addClient() | ||
617 | emit clientManaging(this); | 617 | emit clientManaging(this); | ||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |