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
bd4e4013
Verified
Commit
bd4e4013
authored
Sep 16, 2022
by
ivan tkachenko
Browse files
effects/private: Nuke an unnecessary loop
Yes, Marco, there is a more efficient way. (cherry picked from commit
1f0a0c89
)
parent
30de75a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libkwineffects/kwinquickeffect.cpp
View file @
bd4e4013
...
...
@@ -41,16 +41,7 @@ bool QuickSceneEffectPrivate::isItemOnScreen(QQuickItem *item, EffectScreen *scr
}
const
QuickSceneView
*
view
=
views
[
screen
];
auto
*
rootItem
=
view
->
rootItem
();
auto
candidate
=
item
->
parentItem
();
// Is there a more efficient way?
while
(
candidate
)
{
if
(
candidate
==
rootItem
)
{
return
true
;
}
candidate
=
candidate
->
parentItem
();
}
return
false
;
return
item
->
window
()
==
view
->
window
();
}
QuickSceneView
::
QuickSceneView
(
QuickSceneEffect
*
effect
,
EffectScreen
*
screen
)
...
...
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