Commit e63783df authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Drop legacy virtual desktop api

The plasma window management protocol is intended to be used by
plasmashell. Since kwin and plasmashell have the same release cycle, we
know that the legacy virtual desktop stuff is unused so it can be
dropped to simplify code.
parent 9769969d
......@@ -293,12 +293,7 @@ ecm_generate_export_header(KWaylandServer
KWaylandServer/kwaylandserver_export.h
GROUP_BASE_NAME KF
VERSION ${PROJECT_VERSION}
DEPRECATED_BASE_VERSION 0
DEPRECATION_VERSIONS 5.5 5.28 5.50 5.52 5.69
)
# TODO: add support for EXCLUDE_DEPRECATED_BEFORE_AND_AT to all KWayland libs
# needs fixing of undeprecated API being still implemented using own deprecated API
target_include_directories(KWaylandServer INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}>")
......
......@@ -62,7 +62,6 @@ public:
void setPid(quint32 pid);
void setThemedIconName(const QString &iconName);
void setIcon(const QIcon &icon);
void setVirtualDesktop(quint32 desktop);
void unmap();
void setState(org_kde_plasma_window_management_state flag, bool set);
void setParentWindow(PlasmaWindowInterface *parent);
......@@ -88,7 +87,6 @@ public:
QString m_appServiceName;
QString m_appObjectPath;
QIcon m_icon;
quint32 m_virtualDesktop = 0;
quint32 m_state = 0;
QString uuid;
......@@ -339,8 +337,6 @@ void PlasmaWindowInterfacePrivate::org_kde_plasma_window_destroy(Resource *resou
void PlasmaWindowInterfacePrivate::org_kde_plasma_window_bind_resource(Resource *resource)
{
send_virtual_desktop_changed(resource->handle, m_virtualDesktop);
for (const auto &desk : plasmaVirtualDesktops) {
send_virtual_desktop_entered(resource->handle, desk);
}
......@@ -497,19 +493,6 @@ void PlasmaWindowInterfacePrivate::setTitle(const QString &title)
}
}
void PlasmaWindowInterfacePrivate::setVirtualDesktop(quint32 desktop)
{
if (m_virtualDesktop == desktop) {
return;
}
m_virtualDesktop = desktop;
const auto clientResources = resourceMap();
for (auto resource : clientResources) {
send_virtual_desktop_changed(resource->handle, m_virtualDesktop);
}
}
void PlasmaWindowInterfacePrivate::unmap()
{
if (unmapped) {
......@@ -638,7 +621,9 @@ void PlasmaWindowInterfacePrivate::org_kde_plasma_window_request_resize(Resource
void PlasmaWindowInterfacePrivate::org_kde_plasma_window_set_virtual_desktop(Resource *resource, uint32_t number)
{
Q_UNUSED(resource)
Q_EMIT q->virtualDesktopRequested(number);
Q_UNUSED(number)
// This method is intentionally left blank.
}
void PlasmaWindowInterfacePrivate::org_kde_plasma_window_set_state(Resource *resource, uint32_t flags, uint32_t state)
......@@ -765,11 +750,6 @@ void PlasmaWindowInterface::setTitle(const QString &title)
d->setTitle(title);
}
void PlasmaWindowInterface::setVirtualDesktop(quint32 desktop)
{
d->setVirtualDesktop(desktop);
}
void PlasmaWindowInterface::unmap()
{
d->unmap();
......
......@@ -111,16 +111,6 @@ public:
void setTitle(const QString &title);
void setAppId(const QString &appId);
void setPid(quint32 pid);
#if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 52)
/**
* @deprecated Since 5.52, use addPlasmaVirtualDesktop and removePlasmaVirtualDesktop
*/
KWAYLANDSERVER_DEPRECATED_VERSION(5,
52,
"Use PlasmaWindowManagementInterface::addPlasmaVirtualDesktop(const QString&) and "
"PlasmaWindowManagementInterface::removePlasmaVirtualDesktop(const QString&)")
void setVirtualDesktop(quint32 desktop);
#endif
void setActive(bool set);
void setMinimized(bool set);
void setMaximized(bool set);
......@@ -239,16 +229,6 @@ Q_SIGNALS:
void closeRequested();
void moveRequested();
void resizeRequested();
#if KWAYLANDSERVER_ENABLE_DEPRECATED_SINCE(5, 52)
/**
* @deprecated Since 5.52, use enterPlasmaVirtualDesktopRequested and leavePlasmaVirtualDesktopRequested instead
*/
KWAYLANDSERVER_DEPRECATED_VERSION(5,
52,
"Use PlasmaWindowManagementInterface::enterPlasmaVirtualDesktopRequested(const QString&) and "
"PlasmaWindowManagementInterface::leavePlasmaVirtualDesktopRequested(const QString&)")
void virtualDesktopRequested(quint32 desktop);
#endif
void activeRequested(bool set);
void minimizedRequested(bool set);
void maximizedRequested(bool set);
......
Supports Markdown
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