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
Plasma
KWin
Commits
773995de
Commit
773995de
authored
Jul 15, 2021
by
Aleix Pol Gonzalez
🐧
Committed by
Aleix Pol Gonzalez
Aug 19, 2021
Browse files
plasma-window-management: Support new activation concepts
parent
aeaa480b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/wayland/plasmawindowmanagement_interface.cpp
View file @
773995de
...
...
@@ -23,7 +23,7 @@
namespace
KWaylandServer
{
static
const
quint32
s_version
=
1
4
;
static
const
quint32
s_version
=
1
5
;
class
PlasmaWindowManagementInterfacePrivate
:
public
QtWaylandServer
::
org_kde_plasma_window_management
{
...
...
@@ -1020,4 +1020,51 @@ QString PlasmaWindowInterface::uuid() const
return
d
->
uuid
;
}
class
PlasmaWindowActivationInterfacePrivate
:
public
QtWaylandServer
::
org_kde_plasma_activation
{
public:
PlasmaWindowActivationInterfacePrivate
(
PlasmaWindowActivationInterface
*
q
)
:
QtWaylandServer
::
org_kde_plasma_activation
()
,
q
(
q
)
{
}
PlasmaWindowActivationInterface
*
const
q
;
};
PlasmaWindowActivationInterface
::
PlasmaWindowActivationInterface
()
:
d
(
new
PlasmaWindowActivationInterfacePrivate
(
this
))
{
}
PlasmaWindowActivationInterface
::~
PlasmaWindowActivationInterface
()
{
const
auto
clientResources
=
d
->
resourceMap
();
for
(
auto
resource
:
clientResources
)
{
d
->
send_finished
(
resource
->
handle
);
}
}
void
PlasmaWindowActivationInterface
::
sendAppId
(
const
QString
&
appid
)
{
const
auto
clientResources
=
d
->
resourceMap
();
for
(
auto
resource
:
clientResources
)
{
d
->
send_app_id
(
resource
->
handle
,
appid
);
}
}
KWaylandServer
::
PlasmaWindowActivationInterface
*
PlasmaWindowManagementInterface
::
createActivation
(
const
QString
&
appid
)
{
auto
activation
=
new
PlasmaWindowActivationInterface
;
const
auto
resources
=
d
->
resourceMap
();
for
(
auto
resource
:
resources
)
{
if
(
resource
->
version
()
<
ORG_KDE_PLASMA_WINDOW_MANAGEMENT_ACTIVATION_SINCE_VERSION
)
{
continue
;
}
auto
connection
=
activation
->
d
->
add
(
resource
->
client
(),
resource
->
version
());
d
->
send_activation
(
resource
->
handle
,
connection
->
handle
);
}
activation
->
sendAppId
(
appid
);
return
activation
;
}
}
src/wayland/plasmawindowmanagement_interface.h
View file @
773995de
...
...
@@ -18,12 +18,24 @@ class Display;
class
PlasmaWindowInterface
;
class
SurfaceInterface
;
class
PlasmaVirtualDesktopManagementInterface
;
class
PlasmaWindowActivationInterfacePrivate
;
class
PlasmaWindowManagementInterfacePrivate
;
class
PlasmaWindowInterfacePrivate
;
/**
* @todo Add documentation
*/
class
KWAYLANDSERVER_EXPORT
PlasmaWindowActivationInterface
{
public:
~
PlasmaWindowActivationInterface
();
void
sendAppId
(
const
QString
&
id
);
private:
friend
class
PlasmaWindowManagementInterface
;
explicit
PlasmaWindowActivationInterface
();
QScopedPointer
<
PlasmaWindowActivationInterfacePrivate
>
d
;
};
class
KWAYLANDSERVER_EXPORT
PlasmaWindowManagementInterface
:
public
QObject
{
Q_OBJECT
...
...
@@ -60,6 +72,14 @@ public:
void
setStackingOrderUuids
(
const
QVector
<
QString
>
&
stackingOrderUuids
);
/**
* Notify about a new application with @p app_id being started
*
* @returns an instance of @class PlasmaWindowActivationInterface to
* be destroyed as the activation process ends.
*/
PlasmaWindowActivationInterface
*
createActivation
(
const
QString
&
app_id
);
Q_SIGNALS:
void
requestChangeShowingDesktop
(
ShowingDesktopState
requestedState
);
...
...
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