File indexing completed on 2024-07-07 05:13:56

0001 /*
0002     SPDX-FileCopyrightText: 2019 Michail Vourlakos <mvourlakos@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #include "trackedlayoutinfo.h"
0007 
0008 //local
0009 #include "windowstracker.h"
0010 #include "../../layout/genericlayout.h"
0011 
0012 namespace Latte {
0013 namespace WindowSystem {
0014 namespace Tracker {
0015 
0016 
0017 TrackedLayoutInfo::TrackedLayoutInfo(Tracker::Windows *tracker, Latte::Layout::GenericLayout *layout)
0018     : TrackedGeneralInfo(tracker),
0019       m_layout(layout)
0020 {
0021     m_activities = m_layout->appliedActivities();
0022 
0023     connect(m_layout, &Latte::Layout::GenericLayout::activitiesChanged, this, [&]() {
0024         m_activities = m_layout->appliedActivities();
0025         updateTrackingCurrentActivity();
0026     });
0027 }
0028 
0029 TrackedLayoutInfo::~TrackedLayoutInfo()
0030 {
0031 }
0032 
0033 Latte::Layout::GenericLayout *TrackedLayoutInfo::layout() const
0034 {
0035     return m_layout;
0036 }
0037 
0038 }
0039 }
0040 }