Skip to content
GitLab
Menu
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
9a10af95
Commit
9a10af95
authored
Mar 16, 2021
by
Kevin Ottens
Committed by
Kevin Ottens
Mar 22, 2021
Browse files
Wire the activity protocol parts to AbstractClient
parent
d612d76e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/abstract_client.cpp
View file @
9a10af95
...
...
@@ -1682,6 +1682,39 @@ void AbstractClient::setupWindowManagementInterface()
}
);
for
(
const
auto
&
activity
:
m_activityList
)
{
w
->
addPlasmaActivity
(
activity
);
}
// Notify clients on activities changes
connect
(
this
,
&
AbstractClient
::
activitiesChanged
,
w
,
[
w
,
this
]
{
const
auto
newActivities
=
m_activityList
.
toSet
();
const
auto
oldActivities
=
w
->
plasmaActivities
().
toSet
();
const
auto
activitiesToAdd
=
newActivities
-
oldActivities
;
for
(
const
auto
&
activity
:
activitiesToAdd
)
{
w
->
addPlasmaActivity
(
activity
);
}
const
auto
activitiesToRemove
=
oldActivities
-
newActivities
;
for
(
const
auto
&
activity
:
activitiesToRemove
)
{
w
->
removePlasmaActivity
(
activity
);
}
});
//Plasma Activities management
//show/hide when the window enters/exits activity
connect
(
w
,
&
PlasmaWindowInterface
::
enterPlasmaActivityRequested
,
this
,
[
this
]
(
const
QString
&
activityId
)
{
setOnActivity
(
activityId
,
true
);
}
);
connect
(
w
,
&
PlasmaWindowInterface
::
leavePlasmaActivityRequested
,
this
,
[
this
]
(
const
QString
&
activityId
)
{
setOnActivity
(
activityId
,
false
);
}
);
m_windowManagementInterface
=
w
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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