Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f1968d0c authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[effects/fadedesktop] Properly check whether given window is on a particular virtual desktop

Summary:
In order to check whether a window is on some particular virtual
desktop, one has to use isOnDesktop.

Also, this change adds implicit support for the new virtual desktop protocol.

Test Plan:
Switched between virtual desktops with a Konsole window being on all
desktops.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16103
parent 07cc4b00
......@@ -40,16 +40,23 @@ effects['desktopChanged(int,int,KWin::EffectWindow*)'].connect(function(oldDeskt
continue;
}
if (w.desktop != oldDesktop && w.desktop != newDesktop) {
// If the window is not on the old and the new desktop or it's
// on both of them, then don't animate it.
var onOldDesktop = w.isOnDesktop(oldDesktop);
var onNewDesktop = w.isOnDesktop(newDesktop);
if (onOldDesktop == onNewDesktop) {
continue;
}
if (w.minimized) {
continue;
}
if (!w.isOnActivity(effects.currentActivity)){
continue;
}
if (w.desktop == oldDesktop) {
if (onOldDesktop) {
animate({
window: w,
duration: duration,
......
......@@ -2044,7 +2044,7 @@ public:
bool isOnAllActivities() const;
QStringList activities() const;
bool isOnDesktop(int d) const;
Q_SCRIPTABLE bool isOnDesktop(int d) const;
bool isOnCurrentDesktop() const;
bool isOnAllDesktops() const;
int desktop() const; // prefer isOnXXX()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment