diff options
authorVlad Zagorodniy <[email protected]>2018-11-07 20:26:42 +0200
committerVlad Zagorodniy <[email protected]>2018-11-07 21:06:37 +0200
commitf4663072774ecb18cd146d5d700574800ea280fc (patch)
parent7b08886e71c447515e587523e5515821efb314ec (diff)
[libkwineffects] Use correct type for the desktops property
Summary: Type of the x11DesktopIds property was changed from QList<int> to QVector<int> in KWin core, but not in libkwineffects. That resulted in having effects like slide not working because Qt can't implicitly convert QVector<int> to QList<int>. Test Plan: Slide effect works again. Reviewers: #kwin, graesslin Reviewed By: #kwin, graesslin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16743
2 files changed, 3 insertions, 7 deletions
diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp
index 92c7498..8a15948 100644
--- a/libkwineffects/kwineffects.cpp
+++ b/libkwineffects/kwineffects.cpp
@@ -857,11 +857,7 @@ WINDOW_HELPER(QString, windowRole, "windowRole")
WINDOW_HELPER(QStringList, activities, "activities")
WINDOW_HELPER(bool, skipsCloseAnimation, "skipsCloseAnimation")
WINDOW_HELPER(KWayland::Server::SurfaceInterface *, surface, "surface")
-QList<int> EffectWindow::desktops() const
- return parent()->property("x11DesktopIds").value<QList<int> >();
+WINDOW_HELPER(QVector<int>, desktops, "x11DesktopIds")
QString EffectWindow::windowClass() const
@@ -988,7 +984,7 @@ bool EffectWindow::isOnCurrentDesktop() const
bool EffectWindow::isOnDesktop(int d) const
- const QList<int> ds = desktops();
+ const QVector<int> ds = desktops();
return ds.isEmpty() || ds.contains(d);
diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h
index d28f70c..e714786 100644
--- a/libkwineffects/kwineffects.h
+++ b/libkwineffects/kwineffects.h
@@ -2091,7 +2091,7 @@ public:
* a length of 1, on Wayland can be any subset.
* If the list is empty it means the window is on all desktops
- QList<int> desktops() const;
+ QVector<int> desktops() const;
int x() const;
int y() const;