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
e5fe1ebd
Commit
e5fe1ebd
authored
Apr 18, 2022
by
Vlad Zahorodnii
Browse files
Remove AbstractClient plumbing casts in Shadow
parent
3c69b08e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shadow.cpp
View file @
e5fe1ebd
...
...
@@ -74,17 +74,13 @@ Shadow *Shadow::createShadowFromX11(AbstractClient *toplevel)
}
}
Shadow
*
Shadow
::
createShadowFromDecoration
(
AbstractClient
*
toplevel
)
Shadow
*
Shadow
::
createShadowFromDecoration
(
AbstractClient
*
window
)
{
auto
c
=
static_cast
<
AbstractClient
*>
(
toplevel
->
isClient
()
?
toplevel
:
nullptr
);
if
(
!
c
)
{
if
(
!
window
->
decoration
())
{
return
nullptr
;
}
if
(
!
c
->
decoration
())
{
return
nullptr
;
}
Shadow
*
shadow
=
Compositor
::
self
()
->
scene
()
->
createShadow
(
toplevel
);
if
(
!
shadow
->
init
(
c
->
decoration
()))
{
Shadow
*
shadow
=
Compositor
::
self
()
->
scene
()
->
createShadow
(
window
);
if
(
!
shadow
->
init
(
window
->
decoration
()))
{
delete
shadow
;
return
nullptr
;
}
...
...
@@ -289,9 +285,9 @@ bool Shadow::updateShadow()
}
if
(
m_decorationShadow
)
{
if
(
auto
c
=
static_cast
<
AbstractClient
*>
(
m_topLevel
->
isClient
()
?
m_topLevel
:
nullptr
)
)
{
if
(
c
->
decoration
())
{
if
(
init
(
c
->
decoration
()))
{
if
(
m_topLevel
)
{
if
(
m_topLevel
->
decoration
())
{
if
(
init
(
m_topLevel
->
decoration
()))
{
return
true
;
}
}
...
...
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