mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-05 12:58:18 +03:00
fixed, screenForContainment
This commit is contained in:
parent
665f39ff56
commit
9aa43f14b0
@ -135,16 +135,10 @@ QList<Plasma::Types::Location> NowDockCorona::freeEdges(int screen) const
|
|||||||
|
|
||||||
int NowDockCorona::screenForContainment(const Plasma::Containment *containment) const
|
int NowDockCorona::screenForContainment(const Plasma::Containment *containment) const
|
||||||
{
|
{
|
||||||
return 0;
|
|
||||||
|
|
||||||
while (const auto *parentCont = qobject_cast<const Plasma::Applet *>(containment->parent())) {
|
|
||||||
if (parentCont->isContainment())
|
|
||||||
containment = qobject_cast<const Plasma::Containment *>(parentCont);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto *view : m_containments) {
|
for (auto *view : m_containments) {
|
||||||
if (view && view->containment() == containment)
|
if (view && view->containment() && view->containment()->id() == containment->id())
|
||||||
return containment->screen();
|
if (view->screen())
|
||||||
|
return qGuiApp->screens().indexOf(view->screen());
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user