Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_services_VncFlinger
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_services_VncFlinger
Commits
e767ecd2
Commit
e767ecd2
authored
2 years ago
by
Nick
Browse files
Options
Downloads
Patches
Plain Diff
small input fix
parent
83451aee
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/AndroidDesktop.cpp
+2
-1
2 additions, 1 deletion
src/AndroidDesktop.cpp
src/InputDevice.cpp
+4
-0
4 additions, 0 deletions
src/InputDevice.cpp
with
6 additions
and
1 deletion
src/AndroidDesktop.cpp
+
2
−
1
View file @
e767ecd2
...
...
@@ -143,6 +143,7 @@ void AndroidDesktop::keyEvent(rdr::U32 keysym, __unused_attr rdr::U32 keycode, b
void
AndroidDesktop
::
pointerEvent
(
const
rfb
::
Point
&
pos
,
int
buttonMask
)
{
if
(
pos
.
x
<
mDisplayRect
.
left
||
pos
.
x
>
mDisplayRect
.
right
||
pos
.
y
<
mDisplayRect
.
top
||
pos
.
y
>
mDisplayRect
.
bottom
)
{
ALOGV
(
"pointer dropped x=%d y=%d left=%d right=%d top=%d bottom=%d"
,
pos
.
x
,
pos
.
y
,
mDisplayRect
.
left
,
mDisplayRect
.
right
,
mDisplayRect
.
top
,
mDisplayRect
.
bottom
);
// outside viewport
return
;
}
...
...
@@ -150,7 +151,7 @@ void AndroidDesktop::pointerEvent(const rfb::Point& pos, int buttonMask) {
uint32_t
x
=
pos
.
x
-
spaceX
;
uint32_t
y
=
pos
.
y
*
((
float
)(
mDisplayRect
.
getHeight
())
/
(
float
)
mPixels
->
height
());
//
ALOGV("pointer xlate x1=%d y1=%d x2=%d y2=%d", pos.x, pos.y, x, y);
ALOGV
(
"pointer xlate x1=%d y1=%d x2=%d y2=%d"
,
pos
.
x
,
pos
.
y
,
x
,
y
);
mServer
->
setCursorPos
(
rfb
::
Point
(
x
,
y
));
mInputDevice
->
pointerEvent
(
buttonMask
,
x
,
y
);
...
...
This diff is collapsed.
Click to expand it.
src/InputDevice.cpp
+
4
−
0
View file @
e767ecd2
...
...
@@ -306,6 +306,10 @@ void InputDevice::pointerEvent(int buttonMask, int x, int y) {
inject
(
EV_KEY
,
BTN_LEFT
,
0
);
}
inject
(
EV_SYN
,
SYN_REPORT
,
0
);
}
else
if
(
mLeftClicked
&&
touch
)
{
inject
(
EV_ABS
,
ABS_X
,
x
);
inject
(
EV_ABS
,
ABS_Y
,
y
);
inject
(
EV_SYN
,
SYN_REPORT
,
0
);
}
if
((
buttonMask
&
4
)
&&
!
mRightClicked
)
// right btn clicked
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment