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
6cf490c9
Commit
6cf490c9
authored
Apr 18, 2022
by
Vlad Zahorodnii
Browse files
Remove AbstractClient plumbing casts in PointerInputRedirection
parent
f7d913af
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pointer_input.cpp
View file @
6cf490c9
...
...
@@ -197,9 +197,8 @@ void PointerInputRedirection::updateToReset()
setDecoration
(
nullptr
);
}
if
(
focus
())
{
auto
t
=
focus
();
if
(
auto
c
=
static_cast
<
AbstractClient
*>
(
t
->
isClient
()
?
t
:
nullptr
))
{
c
->
pointerLeaveEvent
();
if
(
focus
()
->
isClient
())
{
focus
()
->
pointerLeaveEvent
();
}
disconnect
(
m_focusGeometryConnection
);
m_focusGeometryConnection
=
QMetaObject
::
Connection
();
...
...
@@ -558,16 +557,16 @@ void PointerInputRedirection::cleanupDecoration(Decoration::DecoratedClientImpl
void
PointerInputRedirection
::
focusUpdate
(
AbstractClient
*
focusOld
,
AbstractClient
*
focusNow
)
{
if
(
auto
ac
=
static_cast
<
AbstractClient
*>
(
focusOld
&&
focusOld
->
isClient
()
?
focusOld
:
nullptr
)
)
{
ac
->
pointerLeaveEvent
();
breakPointerConstraints
(
ac
->
surface
());
if
(
focusOld
&&
focusOld
->
isClient
())
{
focusOld
->
pointerLeaveEvent
();
breakPointerConstraints
(
focusOld
->
surface
());
disconnectPointerConstraintsConnection
();
}
disconnect
(
m_focusGeometryConnection
);
m_focusGeometryConnection
=
QMetaObject
::
Connection
();
if
(
auto
ac
=
static_cast
<
AbstractClient
*>
(
focusNow
&&
focusNow
->
isClient
()
?
focusNow
:
nullptr
)
)
{
ac
->
pointerEnterEvent
(
m_pos
.
toPoint
());
if
(
focusNow
&&
focusNow
->
isClient
())
{
focusNow
->
pointerEnterEvent
(
m_pos
.
toPoint
());
}
auto
seat
=
waylandServer
()
->
seat
();
...
...
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