mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-31 13:47:20 +03:00
fix #164, Dodge Active is broken for windows on all desktops
This commit is contained in:
parent
827bde86d4
commit
c17732cf17
@ -63,7 +63,7 @@ signals:
|
||||
void windowChanged(WId winfo);
|
||||
void windowAdded(WId wid);
|
||||
void windowRemoved(WId wid);
|
||||
void currentDesktopChanged(int desktop);
|
||||
void currentDesktopChanged();
|
||||
void currentActivityChanged();
|
||||
|
||||
protected:
|
||||
|
@ -36,8 +36,6 @@ XWindowInterface::XWindowInterface(QQuickWindow *const view, QObject *parent)
|
||||
{
|
||||
Q_ASSERT(view != nullptr);
|
||||
|
||||
m_currentDesktop = KWindowSystem::currentDesktop();
|
||||
|
||||
connections << connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged
|
||||
, this, &AbstractWindowInterface::activeWindowChanged);
|
||||
connections << connect(KWindowSystem::self()
|
||||
@ -60,11 +58,7 @@ XWindowInterface::XWindowInterface(QQuickWindow *const view, QObject *parent)
|
||||
}
|
||||
});
|
||||
connections << connect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged
|
||||
, this, [&](int desktop) {
|
||||
m_currentDesktop = desktop;
|
||||
emit currentDesktopChanged(m_currentDesktop);
|
||||
});
|
||||
|
||||
, this, &XWindowInterface::currentDesktopChanged);
|
||||
connections << connect(activities.data(), &KActivities::Consumer::currentActivityChanged
|
||||
, this, &XWindowInterface::currentActivityChanged);
|
||||
|
||||
@ -166,7 +160,7 @@ WindowInfoWrap XWindowInterface::requestInfoActive() const
|
||||
bool XWindowInterface::isOnCurrentDesktop(WId wid) const
|
||||
{
|
||||
KWindowInfo winfo(wid, NET::WMDesktop);
|
||||
return winfo.valid() && winfo.desktop() == m_currentDesktop;
|
||||
return winfo.valid() && winfo.isOnCurrentDesktop();
|
||||
}
|
||||
|
||||
WindowInfoWrap XWindowInterface::requestInfo(WId wid) const
|
||||
|
@ -56,7 +56,6 @@ private:
|
||||
void windowChangedProxy(WId wid, NET::Properties prop1, NET::Properties2 prop2);
|
||||
|
||||
WId m_desktopId;
|
||||
int m_currentDesktop;
|
||||
QPointer<KActivities::Consumer> activities;
|
||||
|
||||
QList<QMetaObject::Connection> connections;
|
||||
|
Loading…
x
Reference in New Issue
Block a user