Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Frameworks
KWayland
Commits
590cc34c
Commit
590cc34c
authored
May 27, 2022
by
Luca Carlon
Committed by
Nate Graham
May 27, 2022
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
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
autotests/client/test_plasmashell.cpp
View file @
590cc34c
...
...
@@ -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
()
...
...
src/client/plasmashell.cpp
View file @
590cc34c
...
...
@@ -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
;
...
...
src/client/plasmashell.h
View file @
590cc34c
...
...
@@ -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.
...
...
src/server/plasmashell_interface.cpp
View file @
590cc34c
...
...
@@ -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
;
...
...
src/server/plasmashell_interface.h
View file @
590cc34c
...
...
@@ -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.
...
...
tests/plasmasurfacetest.cpp
View file @
590cc34c
...
...
@@ -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
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment