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
507bad48
Commit
507bad48
authored
Apr 18, 2022
by
Vlad Zahorodnii
Browse files
Remove AbstractClient plumbing casts in WaylandServer
parent
817656cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wayland_server.cpp
View file @
507bad48
...
...
@@ -521,15 +521,10 @@ SurfaceInterface *WaylandServer::findForeignTransientForSurface(SurfaceInterface
return
m_XdgForeign
->
transientFor
(
surface
);
}
void
WaylandServer
::
shellClientShown
(
AbstractClient
*
toplevel
)
void
WaylandServer
::
shellClientShown
(
AbstractClient
*
window
)
{
auto
client
=
static_cast
<
AbstractClient
*>
(
toplevel
->
isClient
()
?
toplevel
:
nullptr
);
if
(
!
client
)
{
qCWarning
(
KWIN_CORE
)
<<
"Failed to cast a Toplevel which is supposed to be an AbstractClient to AbstractClient"
;
return
;
}
disconnect
(
client
,
&
AbstractClient
::
windowShown
,
this
,
&
WaylandServer
::
shellClientShown
);
Q_EMIT
shellClientAdded
(
client
);
disconnect
(
window
,
&
AbstractClient
::
windowShown
,
this
,
&
WaylandServer
::
shellClientShown
);
Q_EMIT
shellClientAdded
(
window
);
}
void
WaylandServer
::
initWorkspace
()
...
...
@@ -551,10 +546,9 @@ void WaylandServer::initWorkspace()
QVector
<
quint32
>
ids
;
QVector
<
QString
>
uuids
;
for
(
AbstractClient
*
toplevel
:
workspace
()
->
stackingOrder
())
{
auto
*
client
=
static_cast
<
AbstractClient
*>
(
toplevel
->
isClient
()
?
toplevel
:
nullptr
);
if
(
client
&&
client
->
windowManagementInterface
())
{
ids
<<
client
->
windowManagementInterface
()
->
internalId
();
uuids
<<
client
->
windowManagementInterface
()
->
uuid
();
if
(
toplevel
->
windowManagementInterface
())
{
ids
<<
toplevel
->
windowManagementInterface
()
->
internalId
();
uuids
<<
toplevel
->
windowManagementInterface
()
->
uuid
();
}
}
m_windowManagement
->
setStackingOrder
(
ids
);
...
...
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