Commit 52eeb161 authored by Martin Flöser's avatar Martin Flöser
Browse files

Add a notification role to PlasmaShellSurface

Summary:
Plasma needs to be able to mark windows as Notifications, so that KWin
can put them into the right layer.

Reviewers: #plasma_on_wayland

Subscribers: plasma-devel

Tags: #plasma_on_wayland

Differential Revision: https://phabricator.kde.org/D1928
parent 7844e38e
......@@ -156,6 +156,7 @@ void TestPlasmaShell::testRole_data()
QTest::newRow("desktop") << PlasmaShellSurface::Role::Desktop << PlasmaShellSurfaceInterface::Role::Desktop;
QTest::newRow("osd") << PlasmaShellSurface::Role::OnScreenDisplay << PlasmaShellSurfaceInterface::Role::OnScreenDisplay;
QTest::newRow("panel") << PlasmaShellSurface::Role::Panel << PlasmaShellSurfaceInterface::Role::Panel;
QTest::newRow("notification") << PlasmaShellSurface::Role::Notification << PlasmaShellSurfaceInterface::Role::Notification;
}
void TestPlasmaShell::testRole()
......
......@@ -50,7 +50,7 @@ private:
static const quint32 s_version;
};
const quint32 PlasmaShellInterface::Private::s_version = 2;
const quint32 PlasmaShellInterface::Private::s_version = 3;
PlasmaShellInterface::Private::Private(PlasmaShellInterface *q, Display *d)
: Global::Private(d, &org_kde_plasma_shell_interface, s_version)
......@@ -236,6 +236,9 @@ void PlasmaShellSurfaceInterface::Private::setRole(uint32_t role)
case ORG_KDE_PLASMA_SURFACE_ROLE_ONSCREENDISPLAY:
r = Role::OnScreenDisplay;
break;
case ORG_KDE_PLASMA_SURFACE_ROLE_NOTIFICATION:
r = Role::Notification;
break;
case ORG_KDE_PLASMA_SURFACE_ROLE_NORMAL:
default:
r = Role::Normal;
......
......@@ -108,7 +108,8 @@ public:
Normal, ///< A normal surface
Desktop, ///< The surface represents a desktop, normally stacked below all other surfaces
Panel, ///< The surface represents a panel (dock), normally stacked above normal surfaces
OnScreenDisplay ///< The surface represents an on screen display, like a volume changed notification
OnScreenDisplay, ///< The surface represents an on screen display, like a volume changed notification
Notification ///< The surface represents a notification @since 5.24
};
/**
* @returns The requested role, default value is @c Role::Normal.
......
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