mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-01 01:17:51 +03:00
improve trackedinfo(s)
This commit is contained in:
parent
96c081e076
commit
2b316aa728
@ -134,14 +134,22 @@ void TrackedGeneralInfo::setActiveWindow(const WindowId &wid)
|
||||
m_lastActiveWindow->setInformation(m_tracker->infoFor(wid));
|
||||
}
|
||||
|
||||
bool TrackedGeneralInfo::isTrackedOnActivity(const QString &activity) const
|
||||
{
|
||||
//! TODO:: needs to be updated for Layouts case
|
||||
//! a way to access the first enabled View::activities in that specific
|
||||
//! layout
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TrackedGeneralInfo::isTracking(const WindowInfoWrap &winfo) const
|
||||
{
|
||||
return (winfo.isValid()
|
||||
&& !winfo.isPlasmaDesktop()
|
||||
&& !winfo.isMinimized()
|
||||
&& winfo.isOnDesktop(m_wm->currentDesktop())
|
||||
&& winfo.isOnActivity(m_wm->currentActivity()));
|
||||
/*&& m_view->isOnActivity(m_wm->currentActivity()));*/
|
||||
&& winfo.isOnActivity(m_wm->currentActivity())
|
||||
&& isTrackedOnActivity(m_wm->currentActivity()));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -76,6 +76,9 @@ public:
|
||||
signals:
|
||||
void lastActiveWindowChanged();
|
||||
|
||||
protected:
|
||||
virtual bool isTrackedOnActivity(const QString &activity) const;
|
||||
|
||||
private:
|
||||
bool m_enabled;
|
||||
bool m_activeWindowMaximized;
|
||||
|
0
app/wm/tracker/trackedlayoutinfo.h
Normal file
0
app/wm/tracker/trackedlayoutinfo.h
Normal file
@ -101,6 +101,11 @@ Latte::View *TrackedViewInfo::view() const
|
||||
return m_view;
|
||||
}
|
||||
|
||||
bool TrackedViewInfo::isTrackedOnActivity(const QString &activity) const
|
||||
{
|
||||
return m_view->isOnActivity(activity);
|
||||
}
|
||||
|
||||
bool TrackedViewInfo::isTracking(const WindowInfoWrap &winfo) const
|
||||
{
|
||||
return TrackedGeneralInfo::isTracking(winfo)
|
||||
|
@ -66,6 +66,9 @@ public:
|
||||
|
||||
bool isTracking(const WindowInfoWrap &winfo) const override;
|
||||
|
||||
protected:
|
||||
bool isTrackedOnActivity(const QString &activity) const override;
|
||||
|
||||
private:
|
||||
bool m_activeWindowTouching;
|
||||
bool m_existsWindowTouching;
|
||||
|
Loading…
Reference in New Issue
Block a user