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
12ec886c
Commit
12ec886c
authored
Feb 23, 2022
by
Vlad Zahorodnii
Browse files
Port to SeatInterface::notifyPointer{Enter,Leave}
parent
a2b7c09a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pointer_input.cpp
View file @
12ec886c
...
...
@@ -553,8 +553,6 @@ void PointerInputRedirection::cleanupDecoration(Decoration::DecoratedClientImpl
m_decorationDestroyedConnection
=
connect
(
now
,
&
QObject
::
destroyed
,
this
,
&
PointerInputRedirection
::
update
,
Qt
::
QueuedConnection
);
}
static
bool
s_cursorUpdateBlocking
=
false
;
void
PointerInputRedirection
::
focusUpdate
(
Toplevel
*
focusOld
,
Toplevel
*
focusNow
)
{
if
(
AbstractClient
*
ac
=
qobject_cast
<
AbstractClient
*>
(
focusOld
))
{
...
...
@@ -571,17 +569,11 @@ void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow
auto
seat
=
waylandServer
()
->
seat
();
if
(
!
focusNow
||
!
focusNow
->
surface
())
{
seat
->
setFocusedPointerSurface
(
nullptr
);
seat
->
notifyPointerLeave
(
);
return
;
}
// prevent updating cursor and sending motion event outside the previously focused surface
s_cursorUpdateBlocking
=
true
;
seat
->
setFocusedPointerSurface
(
nullptr
);
s_cursorUpdateBlocking
=
false
;
seat
->
notifyPointerMotion
(
m_pos
.
toPoint
());
seat
->
setFocusedPointerSurface
(
focusNow
->
surface
(),
focusNow
->
inputTransformation
());
seat
->
notifyPointerEnter
(
focusNow
->
surface
(),
m_pos
,
focusNow
->
inputTransformation
());
m_focusGeometryConnection
=
connect
(
focusNow
,
&
Toplevel
::
inputTransformationChanged
,
this
,
[
this
]
{
...
...
@@ -1028,10 +1020,6 @@ void CursorImage::handlePointerChanged()
void
CursorImage
::
handleFocusedSurfaceChanged
()
{
if
(
s_cursorUpdateBlocking
)
{
return
;
}
KWaylandServer
::
PointerInterface
*
pointer
=
waylandServer
()
->
seat
()
->
pointer
();
disconnect
(
m_serverCursor
.
connection
);
...
...
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