Commit 590cc34c authored by Luca Carlon's avatar Luca Carlon Committed by Nate Graham
Browse files

Add AppletPopup window type to PlasmaShellSurface

See discussion in plasma-framework!500.

CCBUG: 411462
CCBUG: 332512
parent ee80b2a4
Pipeline #181579 passed with stage
in 4 minutes and 26 seconds
......@@ -146,6 +146,7 @@ void TestPlasmaShell::testRole_data()
QTest::newRow("notification") << PlasmaShellSurface::Role::Notification << PlasmaShellSurfaceInterface::Role::Notification;
QTest::newRow("tooltip") << PlasmaShellSurface::Role::ToolTip << PlasmaShellSurfaceInterface::Role::ToolTip;
QTest::newRow("criticalnotification") << PlasmaShellSurface::Role::CriticalNotification << PlasmaShellSurfaceInterface::Role::CriticalNotification;
QTest::newRow("appletpopup") << PlasmaShellSurface::Role::AppletPopup << PlasmaShellSurfaceInterface::Role::AppletPopup;
}
void TestPlasmaShell::testRole()
......
......@@ -275,6 +275,9 @@ void PlasmaShellSurface::setRole(PlasmaShellSurface::Role role)
wlRole = ORG_KDE_PLASMA_SURFACE_ROLE_CRITICALNOTIFICATION;
}
break;
case Role::AppletPopup:
wlRole = ORG_KDE_PLASMA_SURFACE_ROLE_APPLETPOPUP;
break;
default:
Q_UNREACHABLE();
break;
......
......@@ -234,6 +234,7 @@ public:
Notification, ///< The Surface represents a notification @since 5.24
ToolTip, ///< The Surface represents a tooltip @since 5.24
CriticalNotification, ///< The Surface represents a critical notification, like battery is running out @since 5.58
AppletPopup, ///< The Surface used for applets
};
/**
* Changes the requested Role to @p role.
......
......@@ -35,7 +35,7 @@ private:
static const quint32 s_version;
};
const quint32 PlasmaShellInterface::Private::s_version = 6;
const quint32 PlasmaShellInterface::Private::s_version = 7;
PlasmaShellInterface::Private::Private(PlasmaShellInterface *q, Display *d)
: Global::Private(d, &org_kde_plasma_shell_interface, s_version)
......@@ -237,6 +237,9 @@ void PlasmaShellSurfaceInterface::Private::setRole(uint32_t role)
case ORG_KDE_PLASMA_SURFACE_ROLE_CRITICALNOTIFICATION:
r = Role::CriticalNotification;
break;
case ORG_KDE_PLASMA_SURFACE_ROLE_APPLETPOPUP:
r = Role::AppletPopup;
break;
case ORG_KDE_PLASMA_SURFACE_ROLE_NORMAL:
default:
r = Role::Normal;
......
......@@ -96,6 +96,7 @@ public:
Notification, ///< The surface represents a notification @since 5.24
ToolTip, ///< The surface represents a tooltip @since 5.24
CriticalNotification, ///< The surface represents a critical notification, like battery is running out @since 5.58
AppletPopup, ///< The surface represents an applet
};
/**
* @returns The requested role, default value is @c Role::Normal.
......
......@@ -155,6 +155,8 @@ int main(int argc, char **argv)
parser.addOption(notificationOption);
QCommandLineOption criticalNotificationOption(QStringLiteral("criticalNotification"));
parser.addOption(criticalNotificationOption);
QCommandLineOption appletPopupOption(QStringLiteral("appletPopup"));
parser.addOption(appletPopupOption);
QCommandLineOption panelOption(QStringLiteral("panel"));
parser.addOption(panelOption);
QCommandLineOption desktopOption(QStringLiteral("desktop"));
......@@ -184,6 +186,8 @@ int main(int argc, char **argv)
client.setRole(PlasmaShellSurface::Role::OnScreenDisplay);
} else if (parser.isSet(tooltipOption)) {
client.setRole(PlasmaShellSurface::Role::ToolTip);
} else if (parser.isSet(appletPopupOption)) {
client.setRole(PlasmaShellSurface::Role::AppletPopup);
}
client.setSkipTaskbar(parser.isSet(skipTaskbarOption));
client.setSkipSwitcher(parser.isSet(skipSwitcherOption));
......
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