scripting: Drop Window.x11DesktopIds property

master
Vlad Zahorodnii 2 years ago
parent 150b098ba7
commit ecb58c987f

@ -185,17 +185,4 @@ QString Deleted::windowRole() const
return m_windowRole;
}
QVector<uint> Deleted::x11DesktopIds() const
{
const auto desks = desktops();
QVector<uint> x11Ids;
x11Ids.reserve(desks.count());
std::transform(desks.constBegin(), desks.constEnd(),
std::back_inserter(x11Ids),
[](const VirtualDesktop *vd) {
return vd->x11DesktopNumber();
});
return x11Ids;
}
} // namespace

@ -116,8 +116,6 @@ public:
return m_wasPopupWindow;
}
QVector<uint> x11DesktopIds() const;
/**
* Whether this Deleted represents the outline.
*/

@ -2112,7 +2112,6 @@ MANAGED_HELPER(bool, isFullScreen, isFullScreen, false)
MANAGED_HELPER(bool, keepAbove, keepAbove, false)
MANAGED_HELPER(bool, keepBelow, keepBelow, false)
MANAGED_HELPER(QString, caption, caption, QString());
MANAGED_HELPER(QVector<uint>, desktops, x11DesktopIds, QVector<uint>());
MANAGED_HELPER(bool, isMovable, isMovable, false)
MANAGED_HELPER(bool, isMovableAcrossScreens, isMovableAcrossScreens, false)
MANAGED_HELPER(bool, isUserMove, isInteractiveMove, false)
@ -2127,6 +2126,17 @@ MANAGED_HELPER(bool, isUnresponsive, unresponsive, false)
#undef MANAGED_HELPER
QVector<uint> EffectWindowImpl::desktops() const
{
const auto desks = m_window->desktops();
QVector<uint> ids;
ids.reserve(desks.count());
std::transform(desks.constBegin(), desks.constEnd(), std::back_inserter(ids), [](const VirtualDesktop *vd) {
return vd->x11DesktopNumber();
});
return ids;
}
QString EffectWindowImpl::windowClass() const
{
return m_window->resourceName() + QLatin1Char(' ') + m_window->resourceClass();

@ -1116,7 +1116,6 @@ void Window::setDesktops(QVector<VirtualDesktop *> desktops)
if (wasOnCurrentDesktop != isOnCurrentDesktop()) {
Q_EMIT desktopPresenceChanged(this, was_desk);
}
Q_EMIT x11DesktopIdsChanged();
}
void Window::doSetDesktop()
@ -1176,19 +1175,6 @@ QVector<VirtualDesktop *> Window::desktops() const
return m_desktops;
}
QVector<uint> Window::x11DesktopIds() const
{
const auto desks = desktops();
QVector<uint> x11Ids;
x11Ids.reserve(desks.count());
std::transform(desks.constBegin(), desks.constEnd(),
std::back_inserter(x11Ids),
[](const VirtualDesktop *vd) {
return vd->x11DesktopNumber();
});
return x11Ids;
}
QStringList Window::desktopIds() const
{
const auto desks = desktops();

@ -312,7 +312,6 @@ class KWIN_EXPORT Window : public QObject
/**
* The desktop this Window is on. If the Window is on all desktops the property has value -1.
* This is a legacy property, use x11DesktopIds instead
*
* @deprecated Use the desktops property instead.
*/
@ -333,13 +332,6 @@ class KWIN_EXPORT Window : public QObject
*/
Q_PROPERTY(QStringList activities READ activities WRITE setOnActivities NOTIFY activitiesChanged)
/**
* The x11 ids for all desktops this client is in. On X11 this list will always have a length of 1
*
* @deprecated prefer using apis that use VirtualDesktop objects
*/
Q_PROPERTY(QVector<uint> x11DesktopIds READ x11DesktopIds NOTIFY x11DesktopIdsChanged)
/**
* Indicates that the window should not be included on a taskbar.
*/
@ -987,7 +979,6 @@ public:
*/
void setDesktops(QVector<VirtualDesktop *> desktops);
QVector<uint> x11DesktopIds() const;
QStringList desktopIds() const;
void setMinimized(bool set);
@ -1513,7 +1504,6 @@ Q_SIGNALS:
void desktopPresenceChanged(KWin::Window *, int); // to be forwarded by Workspace
void desktopChanged();
void activitiesChanged(KWin::Window *window);
void x11DesktopIdsChanged();
void minimizedChanged();
void clientMinimized(KWin::Window *window, bool animate);
void clientUnminimized(KWin::Window *window, bool animate);

Loading…
Cancel
Save