2017-07-02 16:12:58 +03:00
/*
* Copyright 2017 Smith AR < audoban @ openmailbox . org >
* Michail Vourlakos < mvourlakos @ gmail . com >
*
* This file is part of Latte - Dock
*
* Latte - Dock is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation ; either version 2 of
* the License , or ( at your option ) any later version .
*
* Latte - Dock is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
2019-05-03 17:01:48 +03:00
# include "centrallayout.h"
2017-07-02 16:12:58 +03:00
2018-12-02 03:05:52 +03:00
// local
2019-04-08 23:07:42 +03:00
# include "sharedlayout.h"
2019-01-22 19:17:55 +03:00
# include "../lattecorona.h"
2019-04-07 23:02:13 +03:00
# include "../screenpool.h"
2019-05-09 17:57:12 +03:00
# include "../layouts/importer.h"
2019-05-09 17:12:57 +03:00
# include "../layouts/manager.h"
2019-05-11 09:23:14 +03:00
# include "../layouts/synchronizer.h"
2019-02-03 01:10:07 +03:00
# include "../settings/universalsettings.h"
2019-04-07 23:02:13 +03:00
# include "../view/view.h"
2018-01-07 20:59:18 +03:00
2018-12-02 03:05:52 +03:00
// KDE
2019-04-06 18:56:24 +03:00
# include <KConfigGroup>
2018-12-02 03:05:52 +03:00
# include <KActivities/Consumer>
2020-04-22 14:09:42 +03:00
// Latte
2020-04-22 21:10:17 +03:00
# include <Latte>
2020-04-22 14:09:42 +03:00
2017-07-02 16:12:58 +03:00
namespace Latte {
2019-05-03 17:01:48 +03:00
CentralLayout : : CentralLayout ( QObject * parent , QString layoutFile , QString assignedName )
2019-04-05 20:39:19 +03:00
: Layout : : GenericLayout ( parent , layoutFile , assignedName )
2017-07-02 16:12:58 +03:00
{
2019-04-05 20:39:19 +03:00
if ( m_loadedCorrectly ) {
2017-07-03 19:50:42 +03:00
loadConfig ( ) ;
2017-07-02 20:19:18 +03:00
init ( ) ;
2017-07-02 16:12:58 +03:00
}
}
2019-05-03 17:01:48 +03:00
CentralLayout : : ~ CentralLayout ( )
2017-07-02 16:12:58 +03:00
{
2017-07-17 22:07:04 +03:00
if ( ! m_layoutFile . isEmpty ( ) ) {
m_layoutGroup . sync ( ) ;
}
2018-01-10 20:48:23 +03:00
}
2018-01-08 20:21:34 +03:00
2019-05-03 17:01:48 +03:00
void CentralLayout : : unloadContainments ( )
2019-04-07 17:20:10 +03:00
{
Layout : : GenericLayout : : unloadContainments ( ) ;
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
2019-05-05 20:47:20 +03:00
disconnectSharedConnections ( ) ;
2019-05-03 17:01:48 +03:00
m_sharedLayout - > removeCentralLayout ( this ) ;
2019-04-07 17:20:10 +03:00
}
}
2019-05-03 17:01:48 +03:00
void CentralLayout : : init ( )
2017-07-02 20:19:18 +03:00
{
2019-05-03 17:01:48 +03:00
connect ( this , & CentralLayout : : activitiesChanged , this , & CentralLayout : : saveConfig ) ;
connect ( this , & CentralLayout : : disableBordersForMaximizedWindowsChanged , this , & CentralLayout : : saveConfig ) ;
connect ( this , & CentralLayout : : sharedLayoutNameChanged , this , & CentralLayout : : saveConfig ) ;
connect ( this , & CentralLayout : : showInMenuChanged , this , & CentralLayout : : saveConfig ) ;
2017-07-02 20:19:18 +03:00
}
2019-05-03 17:01:48 +03:00
void CentralLayout : : initToCorona ( Latte : : Corona * corona )
2018-01-08 20:21:34 +03:00
{
2019-04-06 02:00:37 +03:00
if ( GenericLayout : : initToCorona ( corona ) ) {
connect ( m_corona - > universalSettings ( ) , & UniversalSettings : : canDisableBordersChanged , this , [ & ] ( ) {
if ( m_corona - > universalSettings ( ) - > canDisableBorders ( ) ) {
2018-04-25 00:10:08 +03:00
kwin_setDisabledMaximizedBorders ( disableBordersForMaximizedWindows ( ) ) ;
2019-04-06 02:00:37 +03:00
} else {
kwin_setDisabledMaximizedBorders ( false ) ;
2018-04-25 00:10:08 +03:00
}
} ) ;
2018-01-21 14:52:33 +03:00
2019-05-09 17:12:57 +03:00
if ( m_corona - > layoutsManager ( ) - > memoryUsage ( ) = = Types : : SingleLayout & & m_corona - > universalSettings ( ) - > canDisableBorders ( ) ) {
2019-04-06 02:00:37 +03:00
kwin_setDisabledMaximizedBorders ( disableBordersForMaximizedWindows ( ) ) ;
2019-05-09 17:12:57 +03:00
} else if ( m_corona - > layoutsManager ( ) - > memoryUsage ( ) = = Types : : MultipleLayouts ) {
connect ( m_corona - > layoutsManager ( ) , & Layouts : : Manager : : currentLayoutNameChanged , this , [ & ] ( ) {
2019-04-06 02:00:37 +03:00
if ( m_corona - > universalSettings ( ) - > canDisableBorders ( )
2019-05-09 17:12:57 +03:00
& & m_corona - > layoutsManager ( ) - > currentLayoutName ( ) = = name ( ) ) {
2019-04-06 02:00:37 +03:00
kwin_setDisabledMaximizedBorders ( disableBordersForMaximizedWindows ( ) ) ;
}
} ) ;
}
2018-12-01 19:20:55 +03:00
2019-04-08 23:07:42 +03:00
//! Request the SharedLayout in case there is one and Latte is functioning in MultipleLayouts mode
2019-05-09 17:12:57 +03:00
if ( m_corona - > layoutsManager ( ) - > memoryUsage ( ) = = Types : : MultipleLayouts & & ! m_sharedLayoutName . isEmpty ( ) ) {
2019-05-11 09:23:14 +03:00
if ( m_corona - > layoutsManager ( ) - > synchronizer ( ) - > registerAtSharedLayout ( this , m_sharedLayoutName ) ) {
setSharedLayout ( m_corona - > layoutsManager ( ) - > synchronizer ( ) - > sharedLayout ( m_sharedLayoutName ) ) ;
2019-04-07 15:46:03 +03:00
}
2019-04-06 02:00:37 +03:00
}
2018-08-02 12:58:54 +03:00
}
}
2019-05-03 17:01:48 +03:00
bool CentralLayout : : disableBordersForMaximizedWindows ( ) const
2018-04-25 00:10:08 +03:00
{
return m_disableBordersForMaximizedWindows ;
}
2019-05-03 17:01:48 +03:00
void CentralLayout : : setDisableBordersForMaximizedWindows ( bool disable )
2018-04-25 00:10:08 +03:00
{
if ( m_disableBordersForMaximizedWindows = = disable ) {
return ;
}
m_disableBordersForMaximizedWindows = disable ;
2018-05-10 21:14:48 +03:00
kwin_setDisabledMaximizedBorders ( disable ) ;
2018-04-25 00:10:08 +03:00
emit disableBordersForMaximizedWindowsChanged ( ) ;
}
2019-05-03 17:01:48 +03:00
bool CentralLayout : : kwin_disabledMaximizedBorders ( ) const
2018-04-25 00:10:08 +03:00
{
2019-09-07 23:52:16 +03:00
if ( ! m_corona ) {
return false ;
}
2018-04-25 00:10:08 +03:00
2019-09-07 23:52:16 +03:00
return m_corona - > universalSettings ( ) - > kwin_borderlessMaximizedWindowsEnabled ( ) ;
2018-04-25 00:10:08 +03:00
}
2019-05-03 17:01:48 +03:00
void CentralLayout : : kwin_setDisabledMaximizedBorders ( bool disable )
2018-04-25 00:10:08 +03:00
{
2019-09-07 23:52:16 +03:00
if ( ! m_corona ) {
2018-04-25 00:10:08 +03:00
return ;
}
2019-09-07 23:52:16 +03:00
m_corona - > universalSettings ( ) - > kwin_setDisabledMaximizedBorders ( disable ) ;
2018-04-25 00:10:08 +03:00
}
2019-05-03 17:01:48 +03:00
bool CentralLayout : : showInMenu ( ) const
2017-07-17 18:31:43 +03:00
{
return m_showInMenu ;
}
2019-05-03 17:01:48 +03:00
void CentralLayout : : setShowInMenu ( bool show )
2017-07-17 18:31:43 +03:00
{
if ( m_showInMenu = = show ) {
return ;
}
m_showInMenu = show ;
emit showInMenuChanged ( ) ;
}
2019-05-03 17:01:48 +03:00
Layout : : Type CentralLayout : : type ( ) const
2019-05-02 12:58:56 +03:00
{
2019-05-03 17:01:48 +03:00
return Layout : : Type : : Central ;
2019-05-02 12:58:56 +03:00
}
2019-05-03 17:01:48 +03:00
QStringList CentralLayout : : activities ( ) const
2017-07-17 18:31:43 +03:00
{
return m_activities ;
}
2019-05-03 17:01:48 +03:00
void CentralLayout : : setActivities ( QStringList activities )
2017-07-17 18:31:43 +03:00
{
if ( m_activities = = activities ) {
return ;
}
m_activities = activities ;
emit activitiesChanged ( ) ;
}
2019-05-03 17:01:48 +03:00
QString CentralLayout : : sharedLayoutName ( ) const
2019-02-06 19:15:59 +03:00
{
2019-04-08 23:07:42 +03:00
return m_sharedLayoutName ;
2019-04-07 15:46:03 +03:00
}
2019-02-06 19:15:59 +03:00
2019-05-03 17:01:48 +03:00
void CentralLayout : : setSharedLayoutName ( QString name )
2019-04-07 15:46:03 +03:00
{
2019-05-09 17:57:12 +03:00
if ( m_sharedLayoutName = = name | | ( ! Layouts : : Importer : : layoutExists ( name ) & & ! name . isEmpty ( ) ) ) {
2019-04-07 15:46:03 +03:00
return ;
2019-04-06 02:00:37 +03:00
}
2019-02-06 19:15:59 +03:00
2019-04-08 23:07:42 +03:00
m_sharedLayoutName = name ;
emit sharedLayoutNameChanged ( ) ;
2019-04-07 15:46:03 +03:00
}
2019-04-06 02:00:37 +03:00
2019-05-05 20:47:20 +03:00
SharedLayout * CentralLayout : : sharedLayout ( ) const
{
return m_sharedLayout ;
}
2019-05-03 17:01:48 +03:00
void CentralLayout : : setSharedLayout ( SharedLayout * layout )
2019-04-07 15:46:03 +03:00
{
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout = = layout ) {
2019-04-07 15:46:03 +03:00
return ;
}
2019-05-05 20:47:20 +03:00
disconnectSharedConnections ( ) ;
2019-04-06 02:00:37 +03:00
2019-04-08 23:07:42 +03:00
m_sharedLayout = layout ;
2019-04-06 02:00:37 +03:00
2019-05-05 20:47:20 +03:00
if ( layout ) {
2019-05-05 17:46:14 +03:00
setSharedLayoutName ( m_sharedLayout - > name ( ) ) ;
2019-05-05 20:47:20 +03:00
//! attach new signals
m_sharedConnections < < connect ( m_sharedLayout , & Layout : : GenericLayout : : viewsCountChanged , this , & Layout : : GenericLayout : : viewsCountChanged ) ;
m_sharedConnections < < connect ( m_sharedLayout , & Layout : : AbstractLayout : : nameChanged , this , [ this ] ( ) {
setSharedLayoutName ( m_sharedLayout - > name ( ) ) ;
} ) ;
2019-05-10 00:00:47 +03:00
m_sharedConnections < < connect ( m_sharedLayout , & Layout : : GenericLayout : : viewEdgeChanged , this , [ this ] ( ) {
syncLatteViewsToScreens ( ) ;
} ) ;
2019-05-05 20:47:20 +03:00
} else {
setSharedLayoutName ( QString ( ) ) ;
}
2019-05-05 17:46:14 +03:00
2019-05-12 01:41:09 +03:00
syncLatteViewsToScreens ( ) ;
2019-04-07 15:46:03 +03:00
emit viewsCountChanged ( ) ;
2018-01-14 18:30:29 +03:00
}
2019-05-05 20:47:20 +03:00
void CentralLayout : : disconnectSharedConnections ( )
{
//! drop old signals
for ( const auto & sc : m_sharedConnections ) {
QObject : : disconnect ( sc ) ;
}
m_sharedConnections . clear ( ) ;
}
2019-05-03 17:01:48 +03:00
void CentralLayout : : loadConfig ( )
2017-07-02 20:19:18 +03:00
{
2018-04-25 00:10:08 +03:00
m_disableBordersForMaximizedWindows = m_layoutGroup . readEntry ( " disableBordersForMaximizedWindows " , false ) ;
2019-05-03 00:56:51 +03:00
m_showInMenu = m_layoutGroup . readEntry ( " showInMenu " , false ) ;
2017-07-17 18:31:43 +03:00
m_activities = m_layoutGroup . readEntry ( " activities " , QStringList ( ) ) ;
2018-01-14 14:21:11 +03:00
2019-05-03 00:56:51 +03:00
QString sharedLayoutName = m_layoutGroup . readEntry ( " sharedLayout " , QString ( ) ) ;
2019-05-09 17:57:12 +03:00
if ( Layouts : : Importer : : layoutExists ( sharedLayoutName ) ) {
2019-05-03 00:56:51 +03:00
m_sharedLayoutName = sharedLayoutName ;
}
2018-01-14 14:21:11 +03:00
emit activitiesChanged ( ) ;
2017-07-02 20:19:18 +03:00
}
2019-05-03 17:01:48 +03:00
void CentralLayout : : saveConfig ( )
2017-07-02 20:19:18 +03:00
{
2019-05-03 17:01:48 +03:00
qDebug ( ) < < " CENTRAL layout is saving... for layout: " < < m_layoutName ;
2017-07-17 18:31:43 +03:00
m_layoutGroup . writeEntry ( " showInMenu " , m_showInMenu ) ;
2018-04-25 00:10:08 +03:00
m_layoutGroup . writeEntry ( " disableBordersForMaximizedWindows " , m_disableBordersForMaximizedWindows ) ;
2019-04-08 23:07:42 +03:00
m_layoutGroup . writeEntry ( " sharedLayout " , m_sharedLayoutName ) ;
2017-07-17 18:31:43 +03:00
m_layoutGroup . writeEntry ( " activities " , m_activities ) ;
2017-07-24 18:27:53 +03:00
m_layoutGroup . sync ( ) ;
2017-07-02 20:19:18 +03:00
}
2019-04-08 22:02:50 +03:00
//! OVERRIDES
2019-05-03 17:01:48 +03:00
void CentralLayout : : addView ( Plasma : : Containment * containment , bool forceOnPrimary , int explicitScreen , Layout : : ViewsMap * occupied )
2019-04-08 22:02:50 +03:00
{
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
//! consider already occupied edges from SharedLayout
Layout : : ViewsMap ocMap = m_sharedLayout - > validViewsMap ( ) ;
2019-05-12 01:36:00 +03:00
qDebug ( ) < < " HIGH PRIORITY ALREADY OCCUPIED EDGES :: " < < ocMap ;
2019-04-08 22:02:50 +03:00
Layout : : GenericLayout : : addView ( containment , forceOnPrimary , explicitScreen , & ocMap ) ;
} else {
Layout : : GenericLayout : : addView ( containment , forceOnPrimary , explicitScreen , occupied ) ;
}
}
2019-07-10 17:10:31 +03:00
bool CentralLayout : : configViewIsShown ( ) const
{
bool genericShown = GenericLayout : : configViewIsShown ( ) ;
if ( m_sharedLayout ) {
return ( m_sharedLayout - > configViewIsShown ( ) | | genericShown ) ;
}
return genericShown ;
}
2019-05-03 17:01:48 +03:00
const QStringList CentralLayout : : appliedActivities ( )
2018-01-10 20:48:23 +03:00
{
2019-04-06 02:00:37 +03:00
if ( ! m_corona ) {
return { } ;
2018-01-10 20:48:23 +03:00
}
2020-03-16 20:41:18 +03:00
if ( m_activities . isEmpty ( ) ) {
return m_corona - > layoutsManager ( ) - > synchronizer ( ) - > freeActivities ( ) ;
2018-05-30 22:18:19 +03:00
} else {
2020-03-16 20:41:18 +03:00
return m_activities ;
2018-01-13 13:55:13 +03:00
}
}
2019-05-03 17:01:48 +03:00
QList < Latte : : View * > CentralLayout : : latteViews ( )
2019-04-07 19:42:53 +03:00
{
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
2019-04-07 19:42:53 +03:00
QList < Latte : : View * > views = Layout : : GenericLayout : : latteViews ( ) ;
2019-04-08 23:07:42 +03:00
views < < m_sharedLayout - > latteViews ( ) ;
2019-04-07 19:42:53 +03:00
return views ;
}
return Layout : : GenericLayout : : latteViews ( ) ;
}
2019-05-03 17:01:48 +03:00
int CentralLayout : : viewsCount ( int screen ) const
2019-04-07 23:02:13 +03:00
{
if ( ! m_corona ) {
return 0 ;
}
int views = Layout : : GenericLayout : : viewsCount ( screen ) ;
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
2019-04-07 23:02:13 +03:00
QScreen * scr = m_corona - > screenPool ( ) - > screenForId ( screen ) ;
2019-04-08 23:07:42 +03:00
for ( const auto view : m_sharedLayout - > latteViews ( ) ) {
2019-04-07 23:02:13 +03:00
if ( view & & view - > screen ( ) = = scr & & ! view - > containment ( ) - > destroyed ( ) ) {
+ + views ;
}
}
}
return views ;
}
2019-05-03 17:01:48 +03:00
int CentralLayout : : viewsCount ( QScreen * screen ) const
2019-04-07 23:02:13 +03:00
{
if ( ! m_corona ) {
return 0 ;
}
int views = Layout : : GenericLayout : : viewsCount ( screen ) ;
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
for ( const auto view : m_sharedLayout - > latteViews ( ) ) {
2019-04-07 23:02:13 +03:00
if ( view & & view - > screen ( ) = = screen & & ! view - > containment ( ) - > destroyed ( ) ) {
+ + views ;
}
}
}
return views ;
}
2019-05-03 17:01:48 +03:00
int CentralLayout : : viewsCount ( ) const
2019-04-07 23:02:13 +03:00
{
if ( ! m_corona ) {
return 0 ;
}
int views = Layout : : GenericLayout : : viewsCount ( ) ;
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
for ( const auto view : m_sharedLayout - > latteViews ( ) ) {
2019-04-07 23:02:13 +03:00
if ( view & & view - > containment ( ) & & ! view - > containment ( ) - > destroyed ( ) ) {
+ + views ;
}
}
}
return views ;
}
2019-05-03 17:01:48 +03:00
QList < Plasma : : Types : : Location > CentralLayout : : availableEdgesForView ( QScreen * scr , Latte : : View * forView ) const
2019-04-07 23:02:13 +03:00
{
using Plasma : : Types ;
QList < Types : : Location > edges { Types : : BottomEdge , Types : : LeftEdge ,
Types : : TopEdge , Types : : RightEdge } ;
if ( ! m_corona ) {
return edges ;
}
edges = Layout : : GenericLayout : : availableEdgesForView ( scr , forView ) ;
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
for ( const auto view : m_sharedLayout - > latteViews ( ) ) {
2019-04-07 23:02:13 +03:00
//! make sure that availabe edges takes into account only views that should be excluded,
//! this is why the forView should not be excluded
if ( view & & view ! = forView & & view - > positioner ( ) - > currentScreenName ( ) = = scr - > name ( ) ) {
edges . removeOne ( view - > location ( ) ) ;
}
}
}
return edges ;
}
2019-05-03 17:01:48 +03:00
QList < Plasma : : Types : : Location > CentralLayout : : freeEdges ( QScreen * scr ) const
2019-04-07 23:02:13 +03:00
{
using Plasma : : Types ;
QList < Types : : Location > edges { Types : : BottomEdge , Types : : LeftEdge ,
Types : : TopEdge , Types : : RightEdge } ;
if ( ! m_corona ) {
return edges ;
}
edges = Layout : : GenericLayout : : freeEdges ( scr ) ;
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
for ( const auto view : m_sharedLayout - > latteViews ( ) ) {
2019-04-07 23:02:13 +03:00
if ( view & & view - > positioner ( ) - > currentScreenName ( ) = = scr - > name ( ) ) {
edges . removeOne ( view - > location ( ) ) ;
}
}
}
return edges ;
}
2019-05-03 17:01:48 +03:00
QList < Plasma : : Types : : Location > CentralLayout : : freeEdges ( int screen ) const
2019-04-07 23:02:13 +03:00
{
using Plasma : : Types ;
QList < Types : : Location > edges { Types : : BottomEdge , Types : : LeftEdge ,
Types : : TopEdge , Types : : RightEdge } ;
if ( ! m_corona ) {
return edges ;
}
edges = Layout : : GenericLayout : : freeEdges ( screen ) ;
QScreen * scr = m_corona - > screenPool ( ) - > screenForId ( screen ) ;
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
for ( const auto view : m_sharedLayout - > latteViews ( ) ) {
2019-04-07 23:02:13 +03:00
if ( view & & scr & & view - > positioner ( ) - > currentScreenName ( ) = = scr - > name ( ) ) {
edges . removeOne ( view - > location ( ) ) ;
}
}
}
return edges ;
}
2020-03-14 15:41:07 +03:00
Types : : ViewType CentralLayout : : latteViewType ( uint containmentId ) const
2019-05-12 13:24:00 +03:00
{
for ( const auto view : m_latteViews ) {
2020-03-14 15:41:07 +03:00
if ( view - > containment ( ) & & view - > containment ( ) - > id ( ) = = ( uint ) containmentId ) {
2019-05-12 13:24:00 +03:00
return view - > type ( ) ;
}
}
if ( m_sharedLayout ) {
return m_sharedLayout - > latteViewType ( containmentId ) ;
}
return Types : : DockView ;
}
2019-05-03 17:01:48 +03:00
QList < Latte : : View * > CentralLayout : : sortedLatteViews ( QList < Latte : : View * > views )
2019-04-07 23:02:13 +03:00
{
2019-04-08 20:16:29 +03:00
QList < Latte : : View * > vws = latteViews ( ) ;
2019-04-07 17:20:10 +03:00
2019-04-08 20:16:29 +03:00
return Layout : : GenericLayout : : sortedLatteViews ( vws ) ;
2019-04-07 23:02:13 +03:00
}
2019-05-03 17:01:48 +03:00
QList < Latte : : View * > CentralLayout : : viewsWithPlasmaShortcuts ( )
2019-04-07 23:02:13 +03:00
{
QList < Latte : : View * > combined = Layout : : GenericLayout : : viewsWithPlasmaShortcuts ( ) ;
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
combined < < m_sharedLayout - > viewsWithPlasmaShortcuts ( ) ;
2019-04-07 23:02:13 +03:00
}
return combined ;
}
2019-04-07 17:20:10 +03:00
2019-05-03 17:01:48 +03:00
void CentralLayout : : syncLatteViewsToScreens ( Layout : : ViewsMap * occupiedMap )
2019-04-08 18:57:32 +03:00
{
2019-04-08 23:07:42 +03:00
if ( m_sharedLayout ) {
Layout : : ViewsMap map = m_sharedLayout - > validViewsMap ( ) ;
2019-04-08 18:57:32 +03:00
Layout : : GenericLayout : : syncLatteViewsToScreens ( & map ) ;
} else {
Layout : : GenericLayout : : syncLatteViewsToScreens ( ) ;
}
}
2017-07-02 16:12:58 +03:00
}