@ -246,6 +246,7 @@ void DockCorona::addOutput(QScreen *screen)
Q_ASSERT ( screen ) ;
int id = m_screenPool - > id ( screen - > name ( ) ) ;
if ( id = = - 1 ) {
int newId = m_screenPool - > firstAvailableId ( ) ;
m_screenPool - > insertScreenMapping ( newId , screen - > name ( ) ) ;
@ -282,6 +283,7 @@ void DockCorona::screenCountChangedTimer()
qDebug ( ) < < " adding consideration.... " ;
qDebug ( ) < < " dock view running : " < < m_dockViews . count ( ) ;
foreach ( auto scr , qGuiApp - > screens ( ) ) {
qDebug ( ) < < " Found screen: " < < scr - > name ( ) ;
@ -302,8 +304,10 @@ void DockCorona::screenCountChangedTimer()
}
qDebug ( ) < < " removing consideration & updating screen for always on primary docks.... " ;
foreach ( auto view , m_dockViews ) {
bool found { false } ;
foreach ( auto scr , qGuiApp - > screens ( ) ) {
int id = view - > containment ( ) - > screen ( ) ;
@ -375,6 +379,21 @@ void DockCorona::aboutApplication()
aboutDialog - > show ( ) ;
}
QList < Plasma : : Types : : Location > DockCorona : : freeEdges ( QScreen * screen ) const
{
using Plasma : : Types ;
QList < Types : : Location > edges { Types : : BottomEdge , Types : : LeftEdge ,
Types : : TopEdge , Types : : RightEdge } ;
for ( auto * view : m_dockViews ) {
if ( view & & view - > currentScreen ( ) = = screen - > name ( ) ) {
edges . removeOne ( view - > location ( ) ) ;
}
}
return edges ;
}
QList < Plasma : : Types : : Location > DockCorona : : freeEdges ( int screen ) const
{
using Plasma : : Types ;
@ -475,6 +494,7 @@ void DockCorona::addDock(Plasma::Containment *containment)
QString connector = m_screenPool - > connector ( id ) ;
qDebug ( ) < < " add dock - connector : " < < connector ;
bool found { false } ;
foreach ( auto scr , qGuiApp - > screens ( ) ) {
if ( scr & & scr - > name ( ) = = connector ) {
found = true ;