Changeset View
Changeset View
Standalone View
Standalone View
layers.cpp
Show First 20 Lines • Show All 687 Lines • ▼ Show 20 Line(s) | 673 | { | |||
---|---|---|---|---|---|
688 | if (mainwindow->isDock() && !transient->hasTransientPlacementHint()) | 688 | if (mainwindow->isDock() && !transient->hasTransientPlacementHint()) | ||
689 | return false; | 689 | return false; | ||
690 | return true; | 690 | return true; | ||
691 | } | 691 | } | ||
692 | 692 | | |||
693 | // Returns all windows in their stacking order on the root window. | 693 | // Returns all windows in their stacking order on the root window. | ||
694 | ToplevelList Workspace::xStackingOrder() const | 694 | ToplevelList Workspace::xStackingOrder() const | ||
695 | { | 695 | { | ||
696 | if (m_xStackingQueryTree) { | 696 | if (m_xStackingDirty) { | ||
697 | const_cast<Workspace*>(this)->updateXStackingOrder(); | 697 | const_cast<Workspace*>(this)->updateXStackingOrder(); | ||
698 | } | 698 | } | ||
699 | return x_stacking; | 699 | return x_stacking; | ||
700 | } | 700 | } | ||
701 | 701 | | |||
702 | void Workspace::updateXStackingOrder() | 702 | void Workspace::updateXStackingOrder() | ||
703 | { | 703 | { | ||
704 | x_stacking.clear(); | 704 | x_stacking.clear(); | ||
705 | std::unique_ptr<Xcb::Tree> tree{std::move(m_xStackingQueryTree)}; | 705 | std::unique_ptr<Xcb::Tree> tree{std::move(m_xStackingQueryTree)}; | ||
706 | // use our own stacking order, not the X one, as they may differ | 706 | // use our own stacking order, not the X one, as they may differ | ||
707 | foreach (Toplevel * c, stacking_order) | 707 | foreach (Toplevel * c, stacking_order) | ||
708 | x_stacking.append(c); | 708 | x_stacking.append(c); | ||
709 | 709 | | |||
710 | if (!tree->isNull()) { | 710 | if (tree && !tree->isNull()) { | ||
711 | xcb_window_t *windows = tree->children(); | 711 | xcb_window_t *windows = tree->children(); | ||
712 | const auto count = tree->data()->children_len; | 712 | const auto count = tree->data()->children_len; | ||
713 | int foundUnmanagedCount = unmanaged.count(); | 713 | int foundUnmanagedCount = unmanaged.count(); | ||
714 | for (unsigned int i = 0; | 714 | for (unsigned int i = 0; | ||
715 | i < count; | 715 | i < count; | ||
716 | ++i) { | 716 | ++i) { | ||
717 | for (auto it = unmanaged.constBegin(); it != unmanaged.constEnd(); ++it) { | 717 | for (auto it = unmanaged.constBegin(); it != unmanaged.constEnd(); ++it) { | ||
718 | Unmanaged *u = *it; | 718 | Unmanaged *u = *it; | ||
Show All 11 Lines | |||||
730 | if (waylandServer()) { | 730 | if (waylandServer()) { | ||
731 | const auto clients = waylandServer()->internalClients(); | 731 | const auto clients = waylandServer()->internalClients(); | ||
732 | for (auto c: clients) { | 732 | for (auto c: clients) { | ||
733 | if (c->isShown(false)) { | 733 | if (c->isShown(false)) { | ||
734 | x_stacking << c; | 734 | x_stacking << c; | ||
735 | } | 735 | } | ||
736 | } | 736 | } | ||
737 | } | 737 | } | ||
738 | m_xStackingDirty = false; | ||||
738 | } | 739 | } | ||
739 | 740 | | |||
740 | //******************************* | 741 | //******************************* | ||
741 | // Client | 742 | // Client | ||
742 | //******************************* | 743 | //******************************* | ||
743 | 744 | | |||
744 | void Client::restackWindow(xcb_window_t above, int detail, NET::RequestSource src, xcb_timestamp_t timestamp, bool send_event) | 745 | void Client::restackWindow(xcb_window_t above, int detail, NET::RequestSource src, xcb_timestamp_t timestamp, bool send_event) | ||
745 | { | 746 | { | ||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |