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
a429739f
Commit
a429739f
authored
Apr 18, 2022
by
Vlad Zahorodnii
Browse files
Remove AbstractClient plumbing casts in DbusInterface
parent
348e20e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dbusinterface.cpp
View file @
a429739f
...
...
@@ -235,16 +235,18 @@ QVariantMap DBusInterface::queryWindowInfo()
setDelayedReply
(
true
);
kwinApp
()
->
platform
()
->
startInteractiveWindowSelection
(
[
this
](
AbstractClient
*
t
)
{
if
(
auto
c
=
static_cast
<
AbstractClient
*>
(
t
->
isClient
()
?
t
:
nullptr
))
{
QDBusConnection
::
sessionBus
().
send
(
m_replyQueryWindowInfo
.
createReply
(
clientToVariantMap
(
c
)));
}
else
if
(
qobject_cast
<
Unmanaged
*>
(
t
))
{
QDBusConnection
::
sessionBus
().
send
(
m_replyQueryWindowInfo
.
createErrorReply
(
QStringLiteral
(
"org.kde.KWin.Error.InvalidWindow"
),
QStringLiteral
(
"Tried to query information about an unmanaged window"
)));
}
else
{
if
(
!
t
)
{
QDBusConnection
::
sessionBus
().
send
(
m_replyQueryWindowInfo
.
createErrorReply
(
QStringLiteral
(
"org.kde.KWin.Error.UserCancel"
),
QStringLiteral
(
"User cancelled the query"
)));
return
;
}
if
(
t
->
isClient
())
{
QDBusConnection
::
sessionBus
().
send
(
m_replyQueryWindowInfo
.
createReply
(
clientToVariantMap
(
t
)));
}
else
{
QDBusConnection
::
sessionBus
().
send
(
m_replyQueryWindowInfo
.
createErrorReply
(
QStringLiteral
(
"org.kde.KWin.Error.InvalidWindow"
),
QStringLiteral
(
"Tried to query information about an unmanaged window"
)));
}
});
return
QVariantMap
{};
...
...
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