From e13793df3825668385091d9a1d5b688df0bc18ce Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 12 May 2019 01:36:00 +0300 Subject: [PATCH] identify screen id at startup for primary screens --- app/layout/centrallayout.cpp | 1 + app/layout/genericlayout.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/layout/centrallayout.cpp b/app/layout/centrallayout.cpp index 74b307693..9943d4f36 100644 --- a/app/layout/centrallayout.cpp +++ b/app/layout/centrallayout.cpp @@ -284,6 +284,7 @@ void CentralLayout::addView(Plasma::Containment *containment, bool forceOnPrimar if (m_sharedLayout) { //! consider already occupied edges from SharedLayout Layout::ViewsMap ocMap = m_sharedLayout->validViewsMap(); + qDebug() << " HIGH PRIORITY ALREADY OCCUPIED EDGES :: " << ocMap; Layout::GenericLayout::addView(containment, forceOnPrimary, explicitScreen, &ocMap); } else { Layout::GenericLayout::addView(containment, forceOnPrimary, explicitScreen, occupied); diff --git a/app/layout/genericlayout.cpp b/app/layout/genericlayout.cpp index 5d80b5a75..af349a384 100644 --- a/app/layout/genericlayout.cpp +++ b/app/layout/genericlayout.cpp @@ -654,7 +654,9 @@ void GenericLayout::addView(Plasma::Containment *containment, bool forceOnPrimar id = containment->lastScreen(); } - if (explicitScreen > -1) { + if (onPrimary) { + id = m_corona->screenPool()->primaryScreenId(); + } else if (explicitScreen > -1) { id = explicitScreen; }