1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 01:33:50 +03:00

fix broken initialization of windows tracking

--some improvements of 0.10.5 broke the windows tracking
initialization. This is a fix in order for windows tracking
to be enabled/disabled properly per dock/panel during
startup phase.
This commit is contained in:
Michail Vourlakos 2021-12-17 11:52:10 +02:00
parent 51f166bf51
commit 4e28392c3e
3 changed files with 11 additions and 13 deletions

View File

@ -35,14 +35,9 @@ WindowsTracker::WindowsTracker(Latte::View *parent)
} }
}); });
connect(m_latteView->positioner(), &Positioner::startupFinished, this, [&]() {
//! During startup phase windows tracking is not enabled and does not
//! influence startup sequence at all. At the same time to windows tracking
//! takes place during startup and as such startup time is reduced
m_wm->windowsTracker()->addView(m_latteView); m_wm->windowsTracker()->addView(m_latteView);
emit allScreensChanged(); emit allScreensChanged();
emit currentScreenChanged(); emit currentScreenChanged();
});
} }
WindowsTracker::~WindowsTracker() WindowsTracker::~WindowsTracker()

View File

@ -79,10 +79,10 @@ protected:
Tracker::Windows *m_tracker{nullptr}; Tracker::Windows *m_tracker{nullptr};
private: private:
bool m_enabled; bool m_enabled{false};
bool m_activeWindowMaximized; bool m_activeWindowMaximized{false};
bool m_existsWindowActive; bool m_existsWindowActive{false};
bool m_existsWindowMaximized; bool m_existsWindowMaximized{false};
bool m_isTrackingCurrentActivity{true}; bool m_isTrackingCurrentActivity{true};

View File

@ -319,7 +319,10 @@ Item {
Binding{ Binding{
target: latteView && latteView.windowsTracker ? latteView.windowsTracker : null target: latteView && latteView.windowsTracker ? latteView.windowsTracker : null
property: "enabled" property: "enabled"
when: latteView && latteView.windowsTracker && latteView.visibility //! During startup phase windows tracking is not enabled and does not
//! influence startup sequence at all. At the same time no windows tracking
//! takes place during startup and as such startup time is reduced
when: latteView && latteView.windowsTracker && latteView.visibility && !root.inStartup
value: (latteView && latteView.visibility value: (latteView && latteView.visibility
&& !(latteView.visibility.mode === LatteCore.Types.AlwaysVisible /* Visibility */ && !(latteView.visibility.mode === LatteCore.Types.AlwaysVisible /* Visibility */
|| latteView.visibility.mode === LatteCore.Types.WindowsGoBelow || latteView.visibility.mode === LatteCore.Types.WindowsGoBelow