Changeset View
Changeset View
Standalone View
Standalone View
effects.cpp
Show First 20 Lines • Show All 1093 Lines • ▼ Show 20 Line(s) | 1091 | if (waylandServer()) { | |||
---|---|---|---|---|---|
1094 | } | 1094 | } | ||
1095 | } | 1095 | } | ||
1096 | if (auto u = Workspace::self()->findUnmanaged(w->winId())) { | 1096 | if (auto u = Workspace::self()->findUnmanaged(w->winId())) { | ||
1097 | return u->effectWindow(); | 1097 | return u->effectWindow(); | ||
1098 | } | 1098 | } | ||
1099 | return nullptr; | 1099 | return nullptr; | ||
1100 | } | 1100 | } | ||
1101 | 1101 | | |||
1102 | EffectWindow *EffectsHandlerImpl::findWindow(const QUuid &id) const | ||||
1103 | { | ||||
1104 | if (const auto client = workspace()->findAbstractClient([&id] (const AbstractClient *c) { return c->internalId() == id; })) { | ||||
1105 | return client->effectWindow(); | ||||
1106 | } | ||||
1107 | if (const auto unmanaged = workspace()->findUnmanaged([&id] (const Unmanaged *c) { return c->internalId() == id; })) { | ||||
1108 | return unmanaged->effectWindow(); | ||||
1109 | } | ||||
1110 | return nullptr; | ||||
1111 | } | ||||
1102 | 1112 | | |||
1103 | EffectWindowList EffectsHandlerImpl::stackingOrder() const | 1113 | EffectWindowList EffectsHandlerImpl::stackingOrder() const | ||
1104 | { | 1114 | { | ||
1105 | ToplevelList list = Workspace::self()->xStackingOrder(); | 1115 | ToplevelList list = Workspace::self()->xStackingOrder(); | ||
1106 | EffectWindowList ret; | 1116 | EffectWindowList ret; | ||
1107 | for (Toplevel *t : list) { | 1117 | for (Toplevel *t : list) { | ||
1108 | if (EffectWindow *w = effectWindow(t)) | 1118 | if (EffectWindow *w = effectWindow(t)) | ||
1109 | ret.append(w); | 1119 | ret.append(w); | ||
▲ Show 20 Lines • Show All 908 Lines • ▼ Show 20 Line(s) | 2027 | { | |||
2018 | effects->setElevatedWindow(this, elevate); | 2028 | effects->setElevatedWindow(this, elevate); | ||
2019 | } | 2029 | } | ||
2020 | 2030 | | |||
2021 | void EffectWindowImpl::registerThumbnail(AbstractThumbnailItem *item) | 2031 | void EffectWindowImpl::registerThumbnail(AbstractThumbnailItem *item) | ||
2022 | { | 2032 | { | ||
2023 | if (WindowThumbnailItem *thumb = qobject_cast<WindowThumbnailItem*>(item)) { | 2033 | if (WindowThumbnailItem *thumb = qobject_cast<WindowThumbnailItem*>(item)) { | ||
2024 | insertThumbnail(thumb); | 2034 | insertThumbnail(thumb); | ||
2025 | connect(thumb, SIGNAL(destroyed(QObject*)), SLOT(thumbnailDestroyed(QObject*))); | 2035 | connect(thumb, SIGNAL(destroyed(QObject*)), SLOT(thumbnailDestroyed(QObject*))); | ||
2026 | connect(thumb, SIGNAL(wIdChanged(qulonglong)), SLOT(thumbnailTargetChanged())); | 2036 | connect(thumb, &WindowThumbnailItem::wIdChanged, this, &EffectWindowImpl::thumbnailTargetChanged); | ||
2027 | } else if (DesktopThumbnailItem *desktopThumb = qobject_cast<DesktopThumbnailItem*>(item)) { | 2037 | } else if (DesktopThumbnailItem *desktopThumb = qobject_cast<DesktopThumbnailItem*>(item)) { | ||
2028 | m_desktopThumbnails.append(desktopThumb); | 2038 | m_desktopThumbnails.append(desktopThumb); | ||
2029 | connect(desktopThumb, SIGNAL(destroyed(QObject*)), SLOT(desktopThumbnailDestroyed(QObject*))); | 2039 | connect(desktopThumb, SIGNAL(destroyed(QObject*)), SLOT(desktopThumbnailDestroyed(QObject*))); | ||
2030 | } | 2040 | } | ||
2031 | } | 2041 | } | ||
2032 | 2042 | | |||
2033 | void EffectWindowImpl::thumbnailDestroyed(QObject *object) | 2043 | void EffectWindowImpl::thumbnailDestroyed(QObject *object) | ||
2034 | { | 2044 | { | ||
▲ Show 20 Lines • Show All 334 Lines • Show Last 20 Lines |