Skip to content
GitLab
Menu
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
5c15cca1
Commit
5c15cca1
authored
Mar 15, 2021
by
Vlad Zahorodnii
Browse files
wayland: Switch to SeatInterface::notifyPointerButton()
parent
ade861d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/input.cpp
View file @
5c15cca1
...
...
@@ -292,11 +292,10 @@ public:
if
(
pointerSurfaceAllowed
())
{
// TODO: can we leak presses/releases here when we move the mouse in between from an allowed surface to
// disallowed one or vice versa?
if
(
event
->
type
()
==
QEvent
::
MouseButtonPress
)
{
seat
->
notifyPointerPress
(
nativeButton
);
}
else
{
seat
->
notifyPointerRelease
(
nativeButton
);
}
const
auto
state
=
event
->
type
()
==
QEvent
::
MouseButtonPress
?
KWaylandServer
::
PointerButtonState
::
Pressed
:
KWaylandServer
::
PointerButtonState
::
Released
;
seat
->
notifyPointerButton
(
nativeButton
,
state
);
seat
->
notifyPointerFrame
();
}
}
...
...
@@ -1409,11 +1408,11 @@ public:
break
;
}
case
QEvent
::
MouseButtonPress
:
seat
->
notifyPointer
Press
(
nativeButton
);
seat
->
notifyPointer
Button
(
nativeButton
,
KWaylandServer
::
PointerButtonState
::
Pressed
);
seat
->
notifyPointerFrame
();
break
;
case
QEvent
::
MouseButtonRelease
:
seat
->
notifyPointer
Release
(
nativeButton
);
seat
->
notifyPointer
Button
(
nativeButton
,
KWaylandServer
::
PointerButtonState
::
Released
);
seat
->
notifyPointerFrame
();
break
;
default:
...
...
@@ -1917,11 +1916,11 @@ public:
break
;
}
case
QEvent
::
MouseButtonPress
:
seat
->
notifyPointer
Press
(
nativeButton
);
seat
->
notifyPointer
Button
(
nativeButton
,
KWaylandServer
::
PointerButtonState
::
Pressed
);
seat
->
notifyPointerFrame
();
break
;
case
QEvent
::
MouseButtonRelease
:
seat
->
notifyPointer
Release
(
nativeButton
);
seat
->
notifyPointer
Button
(
nativeButton
,
KWaylandServer
::
PointerButtonState
::
Released
);
seat
->
notifyPointerFrame
();
break
;
default:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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