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
c7736493
Commit
c7736493
authored
Apr 25, 2022
by
Vlad Zahorodnii
Browse files
Simplify EffectHandler::findWindow(uuid) implementation
With Workspace::findToplevel() code paths in findWindow() can be unified.
parent
beecf8c9
Pipeline
#168583
passed with stage
in 13 minutes and 53 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/effects.cpp
View file @
c7736493
...
...
@@ -1125,15 +1125,8 @@ EffectWindow *EffectsHandlerImpl::findWindow(QWindow *w) const
EffectWindow
*
EffectsHandlerImpl
::
findWindow
(
const
QUuid
&
id
)
const
{
if
(
const
auto
client
=
workspace
()
->
findAbstractClient
([
&
id
](
const
Window
*
c
)
{
return
c
->
internalId
()
==
id
;
}))
{
return
client
->
effectWindow
();
}
if
(
const
auto
unmanaged
=
workspace
()
->
findUnmanaged
([
&
id
](
const
Unmanaged
*
c
)
{
return
c
->
internalId
()
==
id
;
}))
{
return
unmanaged
->
effectWindow
();
if
(
Window
*
window
=
workspace
()
->
findToplevel
(
id
))
{
return
window
->
effectWindow
();
}
return
nullptr
;
}
...
...
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