Commit 157a82d7 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

Port the waylandtasksmodel to use the uuid instead of the internalId

internalId wasn't meant to be used and is deprecated.
parent f717a2fb
......@@ -93,6 +93,13 @@ set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
TYPE OPTIONAL
PURPOSE "Required for building the X11 based workspace")
pkg_check_modules(PipeWire IMPORTED_TARGET libpipewire-0.3)
add_feature_info(PipeWire PipeWire_FOUND "Required for Wayland screencasting")
find_package(QtWaylandScanner REQUIRED)
find_package(PlasmaWaylandProtocols REQUIRED)
find_package(Wayland REQUIRED COMPONENTS Client)
if(X11_FOUND)
find_package(XCB MODULE REQUIRED COMPONENTS XCB RANDR)
set_package_properties(XCB PROPERTIES TYPE REQUIRED)
......
......@@ -24,6 +24,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "tasksmodel.h"
#include "activityinfo.h"
#include "virtualdesktopinfo.h"
#include "PipeWireSourceItem.h"
#include "screencastingitem.h"
#include <QQmlEngine>
......@@ -44,6 +46,8 @@ void TaskManagerPlugin::registerTypes(const char *uri)
qmlRegisterType<TasksModel>(uri, 0, 1, "TasksModel");
qmlRegisterType<ActivityInfo>(uri, 0, 1, "ActivityInfo");
qmlRegisterType<VirtualDesktopInfo>(uri, 0, 1, "VirtualDesktopInfo");
qmlRegisterType<PipeWireSourceItem>(uri, 0, 1, "PipeWireSourceItem");
qmlRegisterType<ScreencastingItem>(uri, 0, 1, "ScreencastingItem");
}
}
......@@ -409,11 +409,11 @@ QVariant WaylandTasksModel::data(const QModelIndex &index, int role) const
} else if (role == LauncherUrl || role == LauncherUrlWithoutIcon) {
return d->appData(window).url;
} else if (role == WinIdList) {
return QVariantList() << window->internalId();
return QVariantList() << window->uuid();
} else if (role == MimeType) {
return d->mimeType();
} else if (role == MimeData) {
return QByteArray::number(window->internalId());
return window->uuid();
} else if (role == IsWindow) {
return true;
} else if (role == IsActive) {
......@@ -466,7 +466,7 @@ QVariant WaylandTasksModel::data(const QModelIndex &index, int role) const
} else if (role == AppPid) {
return window->pid();
} else if (role == StackingOrder) {
return d->windowManagement->stackingOrder().indexOf(window->internalId());
return d->windowManagement->stackingOrderUuids().indexOf(window->uuid());
} else if (role == ApplicationMenuObjectPath) {
return window->applicationMenuObjectPath();
} else if (role == ApplicationMenuServiceName) {
......
......@@ -59,4 +59,4 @@ X-KDE-autostart-phase=0
Icon=plasma
NoDisplay=true
X-KDE-Wayland-Interfaces=org_kde_plasma_window_management,org_kde_kwin_keystate
X-KDE-Wayland-Interfaces=org_kde_plasma_window_management,org_kde_kwin_keystate,zkde_screencast_unstable_v1
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