Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Add option to clamp events coordinates inside the device screen (swipe from left/right edge) #1581

Open
1 task done
quangkieu opened this issue Jul 9, 2020 · 13 comments

Comments

@quangkieu
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I am using Samsung Note 10 and I setup my phone to remove Navigation Bar and using One Hand Operation+ for swipe gesture from left/right edge of the screen for navigation.
Like swipe left from right edge to back, swipe left + down from right edge for home.
For that setup, currently I increase horizontal of the window to add black padding zone
But the mouse drag from black padding zone is not recognized.

Describe the solution you'd like
A clear and concise description of what you want to happen.

  • Accept swipe started from black padding zone that ended inside screen zone
    I am using follow coordinate:
    ^
    |
    y
    x ->

So when a swipe start from padding zone, we would wait only until the mouse click and being dragged into the screen as filter condition of mistake.
When condition meet, the gesture would start from same Y of the coordinate but we would rewrite the start X coordinator to be inside of screen
The end gesture would be where mouse ended the drag

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@quangkieu quangkieu changed the title [Swipe] [Swipe] from left/right edge Jul 9, 2020
@rom1v
Copy link
Collaborator

rom1v commented Jul 9, 2020

The click/move events are already forwarded outside the device screen.

For example, in some photo app (or even your home), start a drag which ends outside the screen, it should work (and continue to move when you move your mouse outside).

This is also the case for events starting outside the screen. You can see it by just adding a log:

diff --git a/server/src/main/java/com/genymobile/scrcpy/Controller.java b/server/src/main/java/com/genymobile/scrcpy/Controller.java
index 71e7ec9c..1921188d 100644
--- a/server/src/main/java/com/genymobile/scrcpy/Controller.java
+++ b/server/src/main/java/com/genymobile/scrcpy/Controller.java
@@ -195,6 +195,7 @@ public class Controller {
             }
         }
 
+        Ln.i("point = " + point);
         MotionEvent event = MotionEvent
                 .obtain(lastTouchDown, now, action, pointerCount, pointerProperties, pointerCoords, 0, buttons, 1f, 1f, DEVICE_ID_VIRTUAL, 0,
                         InputDevice.SOURCE_TOUCHSCREEN, 0);
[server] INFO: point = Point{x=-108, y=2373} (0)
[server] INFO: point = Point{x=-108, y=2373} (1)

(notice the negative x coordinate)

Your system may just ignore it (and consider only events in the screen rectangle).

But on my device (OnePlus 7 pro), it works, I can start a swipe event from outside the device to generate BACK.

(note that if you just want BACK and HOME, right-click is BACK, middle-click is HOME)

@quangkieu
Copy link
Author

2020-07-09_20-02-12
Here is the gif of trying to use swipe from black pad zone

@rom1v
Copy link
Collaborator

rom1v commented Jul 10, 2020

If you use the binaries from #1580 (comment), what is the output in the console when you click in the black borders?

@quangkieu
Copy link
Author

quangkieu commented Jul 10, 2020

Below is the gif and the Console Output

2020-07-10_17-00-52-output

Console Dump
PS C:\Users\ktaq> scrcpy -Sw 2>&1 | Out-Host | clip
scrcpy : INFO: scrcpy 1.14 <https://github.com/Genymobile/scrcpy>
At line:1 char:1
+ scrcpy -Sw 2>&1 | Out-Host | clip
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (INFO: scrcpy 1....ymobile/scrcpy>:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

C:\ProgramData\chocolatey\lib\scrcpy\tools\scrcpy-server: 1 file pushed, 0 skipped. 58.2 MB/s (33218 bytes in 0.001s)
[server] INFO: Device: samsung SM-N970U1 (Android 10)
INFO: Created renderer: direct3d
INFO: Renderer: direct3d
INFO: Initial texture: 1080x2280
ERROR: SDL failed to get a vertex buffer for this Direct3D 9 rendering batch!
ERROR: Dropping back to a slower method.
ERROR: This might be a brief hiccup, but if performance is bad, this is probably why.
ERROR: This error will not be logged again for this renderer.
[server] INFO: Device screen turned off
[server] INFO: point = Point{x=1181, y=318}
[server] INFO: point = Point{x=1174, y=318}
[server] INFO: point = Point{x=1166, y=318}
[server] INFO: point = Point{x=1159, y=318}
[server] INFO: point = Point{x=1159, y=326}
[server] INFO: point = Point{x=1152, y=326}
[server] INFO: point = Point{x=1145, y=326}
[server] INFO: point = Point{x=1145, y=333}
[server] INFO: point = Point{x=1137, y=333}
[server] INFO: point = Point{x=1130, y=340}
[server] INFO: point = Point{x=1123, y=340}
[server] INFO: point = Point{x=1116, y=347}
[server] INFO: point = Point{x=1108, y=355}
[server] INFO: point = Point{x=1101, y=355}
[server] INFO: point = Point{x=1094, y=362}
[server] INFO: point = Point{x=1087, y=369}
[server] INFO: point = Point{x=1080, y=376}
[server] INFO: point = Point{x=1065, y=384}
[server] INFO: point = Point{x=1058, y=391}
[server] INFO: point = Point{x=1051, y=398}
[server] INFO: point = Point{x=1036, y=405}
[server] INFO: point = Point{x=1029, y=413}
[server] INFO: point = Point{x=1014, y=420}
[server] INFO: point = Point{x=1007, y=427}
[server] INFO: point = Point{x=1000, y=434}
[server] INFO: point = Point{x=993, y=441}
[server] INFO: point = Point{x=985, y=441}
[server] INFO: point = Point{x=978, y=449}
[server] INFO: point = Point{x=978, y=456}
[server] INFO: point = Point{x=971, y=463}
[server] INFO: point = Point{x=964, y=470}
[server] INFO: point = Point{x=956, y=470}
[server] INFO: point = Point{x=949, y=478}
[server] INFO: point = Point{x=949, y=485}
[server] INFO: point = Point{x=942, y=485}
[server] INFO: point = Point{x=935, y=492}
[server] INFO: point = Point{x=927, y=499}
[server] INFO: point = Point{x=927, y=507}
[server] INFO: point = Point{x=920, y=514}
[server] INFO: point = Point{x=913, y=521}
[server] INFO: point = Point{x=906, y=528}
[server] INFO: point = Point{x=898, y=536}
[server] INFO: point = Point{x=891, y=543}
[server] INFO: point = Point{x=884, y=550}
[server] INFO: point = Point{x=877, y=557}
[server] INFO: point = Point{x=869, y=565}
[server] INFO: point = Point{x=869, y=572}
[server] INFO: point = Point{x=862, y=579}
[server] INFO: point = Point{x=855, y=586}
[server] INFO: point = Point{x=848, y=601}
[server] INFO: point = Point{x=840, y=608}
[server] INFO: point = Point{x=833, y=615}
[server] INFO: point = Point{x=819, y=623}
[server] INFO: point = Point{x=811, y=630}
[server] INFO: point = Point{x=804, y=637}
[server] INFO: point = Point{x=797, y=644}
[server] INFO: point = Point{x=797, y=652}
[server] INFO: point = Point{x=790, y=659}
[server] INFO: point = Point{x=782, y=666}
[server] INFO: point = Point{x=775, y=673}
[server] INFO: point = Point{x=768, y=681}
[server] INFO: point = Point{x=761, y=688}
[server] INFO: point = Point{x=761, y=695}
[server] INFO: point = Point{x=753, y=702}
[server] INFO: point = Point{x=746, y=710}
[server] INFO: point = Point{x=739, y=717}
[server] INFO: point = Point{x=732, y=724}
[server] INFO: point = Point{x=732, y=731}
[server] INFO: point = Point{x=724, y=739}
[server] INFO: point = Point{x=724, y=746}
[server] INFO: point = Point{x=724, y=746}
[server] INFO: point = Point{x=1210, y=326}
[server] INFO: point = Point{x=1203, y=326}
[server] INFO: point = Point{x=1203, y=333}
[server] INFO: point = Point{x=1195, y=333}
[server] INFO: point = Point{x=1188, y=333}
[server] INFO: point = Point{x=1181, y=340}
[server] INFO: point = Point{x=1174, y=347}
[server] INFO: point = Point{x=1159, y=347}
[server] INFO: point = Point{x=1145, y=355}
[server] INFO: point = Point{x=1130, y=362}
[server] INFO: point = Point{x=1116, y=376}
[server] INFO: point = Point{x=1094, y=384}
[server] INFO: point = Point{x=1080, y=391}
[server] INFO: point = Point{x=1065, y=398}
[server] INFO: point = Point{x=1051, y=413}
[server] INFO: point = Point{x=1036, y=420}
[server] INFO: point = Point{x=1022, y=434}
[server] INFO: point = Point{x=1007, y=441}
[server] INFO: point = Point{x=993, y=456}
[server] INFO: point = Point{x=985, y=463}
[server] INFO: point = Point{x=971, y=478}
[server] INFO: point = Point{x=956, y=499}
[server] INFO: point = Point{x=935, y=514}
[server] INFO: point = Point{x=920, y=528}
[server] INFO: point = Point{x=906, y=550}
[server] INFO: point = Point{x=884, y=572}
[server] INFO: point = Point{x=862, y=586}
[server] INFO: point = Point{x=848, y=608}
[server] INFO: point = Point{x=826, y=623}
[server] INFO: point = Point{x=804, y=637}
[server] INFO: point = Point{x=790, y=659}
[server] INFO: point = Point{x=775, y=673}
[server] INFO: point = Point{x=761, y=688}
[server] INFO: point = Point{x=746, y=702}
[server] INFO: point = Point{x=732, y=710}
[server] INFO: point = Point{x=724, y=724}
[server] INFO: point = Point{x=717, y=731}
[server] INFO: point = Point{x=710, y=739}
[server] INFO: point = Point{x=703, y=746}
[server] INFO: point = Point{x=695, y=746}
[server] INFO: point = Point{x=695, y=753}
[server] INFO: point = Point{x=695, y=760}
[server] INFO: point = Point{x=688, y=760}
[server] INFO: point = Point{x=688, y=768}
[server] INFO: point = Point{x=688, y=775}
[server] INFO: point = Point{x=681, y=775}
[server] INFO: point = Point{x=681, y=782}
[server] INFO: point = Point{x=681, y=789}
[server] INFO: point = Point{x=681, y=797}
[server] INFO: point = Point{x=674, y=804}
[server] INFO: point = Point{x=674, y=811}
[server] INFO: point = Point{x=674, y=818}
[server] INFO: point = Point{x=666, y=818}
[server] INFO: point = Point{x=666, y=826}
[server] INFO: point = Point{x=666, y=833}
[server] INFO: point = Point{x=666, y=840}
[server] INFO: point = Point{x=659, y=840}
[server] INFO: point = Point{x=659, y=847}
[server] INFO: point = Point{x=659, y=855}
[server] INFO: point = Point{x=659, y=855}
[server] INFO: point = Point{x=-152, y=405}
[server] INFO: point = Point{x=-144, y=405}
[server] INFO: point = Point{x=-137, y=405}
[server] INFO: point = Point{x=-130, y=405}
[server] INFO: point = Point{x=-123, y=405}
[server] INFO: point = Point{x=-123, y=413}
[server] INFO: point = Point{x=-115, y=413}
[server] INFO: point = Point{x=-108, y=413}
[server] INFO: point = Point{x=-108, y=420}
[server] INFO: point = Point{x=-101, y=420}
[server] INFO: point = Point{x=-94, y=427}
[server] INFO: point = Point{x=-86, y=427}
[server] INFO: point = Point{x=-86, y=434}
[server] INFO: point = Point{x=-79, y=441}
[server] INFO: point = Point{x=-72, y=449}
[server] INFO: point = Point{x=-72, y=456}
[server] INFO: point = Point{x=-65, y=456}
[server] INFO: point = Point{x=-57, y=470}
[server] INFO: point = Point{x=-50, y=478}
[server] INFO: point = Point{x=-43, y=485}
[server] INFO: point = Point{x=-36, y=492}
[server] INFO: point = Point{x=-28, y=499}
[server] INFO: point = Point{x=-21, y=514}
[server] INFO: point = Point{x=-14, y=521}
[server] INFO: point = Point{x=-7, y=528}
[server] INFO: point = Point{x=0, y=536}
[server] INFO: point = Point{x=14, y=543}
[server] INFO: point = Point{x=21, y=550}
[server] INFO: point = Point{x=28, y=557}
[server] INFO: point = Point{x=36, y=565}
[server] INFO: point = Point{x=43, y=572}
[server] INFO: point = Point{x=43, y=579}
[server] INFO: point = Point{x=50, y=579}
[server] INFO: point = Point{x=57, y=586}
[server] INFO: point = Point{x=65, y=594}
[server] INFO: point = Point{x=72, y=594}
[server] INFO: point = Point{x=72, y=601}
[server] INFO: point = Point{x=79, y=601}
[server] INFO: point = Point{x=79, y=608}
[server] INFO: point = Point{x=86, y=608}
[server] INFO: point = Point{x=86, y=608}
[server] INFO: point = Point{x=-115, y=384}
[server] INFO: point = Point{x=-108, y=384}
[server] INFO: point = Point{x=-101, y=384}
[server] INFO: point = Point{x=-94, y=384}
[server] INFO: point = Point{x=-94, y=391}
[server] INFO: point = Point{x=-86, y=391}
[server] INFO: point = Point{x=-79, y=398}
[server] INFO: point = Point{x=-72, y=405}
[server] INFO: point = Point{x=-65, y=413}
[server] INFO: point = Point{x=-57, y=420}
[server] INFO: point = Point{x=-43, y=427}
[server] INFO: point = Point{x=-36, y=434}
[server] INFO: point = Point{x=-21, y=449}
[server] INFO: point = Point{x=-7, y=456}
[server] INFO: point = Point{x=0, y=470}
[server] INFO: point = Point{x=14, y=478}
[server] INFO: point = Point{x=28, y=485}
[server] INFO: point = Point{x=43, y=499}
[server] INFO: point = Point{x=50, y=507}
[server] INFO: point = Point{x=65, y=514}
[server] INFO: point = Point{x=72, y=528}
[server] INFO: point = Point{x=86, y=536}
[server] INFO: point = Point{x=101, y=550}
[server] INFO: point = Point{x=108, y=557}
[server] INFO: point = Point{x=123, y=572}
[server] INFO: point = Point{x=130, y=579}
[server] INFO: point = Point{x=137, y=586}
[server] INFO: point = Point{x=144, y=594}
[server] INFO: point = Point{x=152, y=601}
[server] INFO: point = Point{x=159, y=608}
[server] INFO: point = Point{x=166, y=615}
[server] INFO: point = Point{x=173, y=615}
[server] INFO: point = Point{x=173, y=623}
[server] INFO: point = Point{x=173, y=630}
[server] INFO: point = Point{x=181, y=630}
[server] INFO: point = Point{x=181, y=637}
[server] INFO: point = Point{x=188, y=637}
[server] INFO: point = Point{x=188, y=644}
[server] INFO: point = Point{x=188, y=652}
[server] INFO: point = Point{x=195, y=652}
[server] INFO: point = Point{x=195, y=659}
[server] INFO: point = Point{x=195, y=659}
[server] INFO: point = Point{x=1043, y=318}
[server] INFO: point = Point{x=1043, y=326}
[server] INFO: point = Point{x=1036, y=326}
[server] INFO: point = Point{x=1036, y=333}
[server] INFO: point = Point{x=1036, y=340}
[server] INFO: point = Point{x=1029, y=340}
[server] INFO: point = Point{x=1029, y=347}
[server] INFO: point = Point{x=1022, y=347}
[server] INFO: point = Point{x=1022, y=355}
[server] INFO: point = Point{x=1014, y=355}
[server] INFO: point = Point{x=1014, y=362}
[server] INFO: point = Point{x=1007, y=369}
[server] INFO: point = Point{x=1007, y=376}
[server] INFO: point = Point{x=1000, y=376}
[server] INFO: point = Point{x=1000, y=384}
[server] INFO: point = Point{x=993, y=384}
[server] INFO: point = Point{x=993, y=391}
[server] INFO: point = Point{x=993, y=398}
[server] INFO: point = Point{x=985, y=398}
[server] INFO: point = Point{x=985, y=405}
[server] INFO: point = Point{x=978, y=405}
[server] INFO: point = Point{x=978, y=413}
[server] INFO: point = Point{x=978, y=420}
[server] INFO: point = Point{x=978, y=427}
[server] INFO: point = Point{x=971, y=427}
[server] INFO: point = Point{x=971, y=434}
[server] INFO: point = Point{x=971, y=441}
[server] INFO: point = Point{x=971, y=449}
[server] INFO: point = Point{x=964, y=449}
[server] INFO: point = Point{x=964, y=456}
[server] INFO: point = Point{x=964, y=463}
[server] INFO: point = Point{x=956, y=463}
[server] INFO: point = Point{x=956, y=470}
[server] INFO: point = Point{x=949, y=478}
[server] INFO: point = Point{x=949, y=485}
[server] INFO: point = Point{x=942, y=485}
[server] INFO: point = Point{x=942, y=492}
[server] INFO: point = Point{x=935, y=499}
[server] INFO: point = Point{x=935, y=507}
[server] INFO: point = Point{x=927, y=507}
[server] INFO: point = Point{x=927, y=514}
[server] INFO: point = Point{x=927, y=521}
[server] INFO: point = Point{x=920, y=521}
[server] INFO: point = Point{x=920, y=528}
[server] INFO: point = Point{x=920, y=536}
[server] INFO: point = Point{x=920, y=543}
[server] INFO: point = Point{x=913, y=543}
[server] INFO: point = Point{x=913, y=550}
[server] INFO: point = Point{x=906, y=550}
[server] INFO: point = Point{x=906, y=557}
[server] INFO: point = Point{x=906, y=565}
[server] INFO: point = Point{x=898, y=565}
[server] INFO: point = Point{x=898, y=572}
[server] INFO: point = Point{x=898, y=579}
[server] INFO: point = Point{x=891, y=579}
[server] INFO: point = Point{x=891, y=586}
[server] INFO: point = Point{x=884, y=586}
[server] INFO: point = Point{x=884, y=594}
[server] INFO: point = Point{x=884, y=601}
[server] INFO: point = Point{x=877, y=601}
[server] INFO: point = Point{x=877, y=608}
[server] INFO: point = Point{x=877, y=615}
[server] INFO: point = Point{x=869, y=615}
[server] INFO: point = Point{x=869, y=623}
[server] INFO: point = Point{x=869, y=630}
[server] INFO: point = Point{x=869, y=637}
[server] INFO: point = Point{x=862, y=637}
[server] INFO: point = Point{x=862, y=644}
[server] INFO: point = Point{x=862, y=652}
[server] INFO: point = Point{x=855, y=652}
[server] INFO: point = Point{x=855, y=659}
[server] INFO: point = Point{x=855, y=666}
[server] INFO: point = Point{x=855, y=673}
[server] INFO: point = Point{x=848, y=673}
[server] INFO: point = Point{x=848, y=681}
[server] INFO: point = Point{x=848, y=688}
[server] INFO: point = Point{x=840, y=688}
[server] INFO: point = Point{x=840, y=695}
[server] INFO: point = Point{x=840, y=702}
[server] INFO: point = Point{x=840, y=710}
[server] INFO: point = Point{x=833, y=717}
[server] INFO: point = Point{x=833, y=724}
[server] INFO: point = Point{x=833, y=731}
[server] INFO: point = Point{x=826, y=739}
[server] INFO: point = Point{x=826, y=746}
[server] INFO: point = Point{x=826, y=760}
[server] INFO: point = Point{x=826, y=768}
[server] INFO: point = Point{x=819, y=775}
[server] INFO: point = Point{x=819, y=782}
[server] INFO: point = Point{x=819, y=797}
[server] INFO: point = Point{x=811, y=804}
[server] INFO: point = Point{x=811, y=811}
[server] INFO: point = Point{x=811, y=818}
[server] INFO: point = Point{x=804, y=833}
[server] INFO: point = Point{x=804, y=840}
[server] INFO: point = Point{x=804, y=847}
[server] INFO: point = Point{x=804, y=855}
[server] INFO: point = Point{x=797, y=862}
[server] INFO: point = Point{x=797, y=869}
[server] INFO: point = Point{x=797, y=876}
[server] INFO: point = Point{x=797, y=883}
[server] INFO: point = Point{x=797, y=891}
[server] INFO: point = Point{x=790, y=898}
[server] INFO: point = Point{x=790, y=905}
[server] INFO: point = Point{x=790, y=912}
[server] INFO: point = Point{x=790, y=920}
[server] INFO: point = Point{x=782, y=934}
[server] INFO: point = Point{x=782, y=941}
[server] INFO: point = Point{x=782, y=949}
[server] INFO: point = Point{x=782, y=956}
[server] INFO: point = Point{x=775, y=956}
[server] INFO: point = Point{x=775, y=963}
[server] INFO: point = Point{x=775, y=970}
[server] INFO: point = Point{x=775, y=978}
[server] INFO: point = Point{x=775, y=985}
[server] INFO: point = Point{x=775, y=992}
[server] INFO: point = Point{x=768, y=992}
[server] INFO: point = Point{x=768, y=999}
[server] INFO: point = Point{x=768, y=1007}
[server] INFO: point = Point{x=768, y=1014}
[server] INFO: point = Point{x=761, y=1014}
[server] INFO: point = Point{x=761, y=1021}
[server] INFO: point = Point{x=753, y=1028}
[server] INFO: point = Point{x=753, y=1036}
[server] INFO: point = Point{x=746, y=1036}
[server] INFO: point = Point{x=746, y=1043}
[server] INFO: point = Point{x=746, y=1043}
[server] INFO: point = Point{x=1036, y=492}
[server] INFO: point = Point{x=1036, y=499}
[server] INFO: point = Point{x=1036, y=507}
[server] INFO: point = Point{x=1036, y=514}
[server] INFO: point = Point{x=1029, y=514}
[server] INFO: point = Point{x=1029, y=521}
[server] INFO: point = Point{x=1022, y=521}
[server] INFO: point = Point{x=1022, y=528}
[server] INFO: point = Point{x=1022, y=536}
[server] INFO: point = Point{x=1014, y=536}
[server] INFO: point = Point{x=1014, y=543}
[server] INFO: point = Point{x=1014, y=550}
[server] INFO: point = Point{x=1014, y=557}
[server] INFO: point = Point{x=1007, y=557}
[server] INFO: point = Point{x=1007, y=565}
[server] INFO: point = Point{x=1007, y=572}
[server] INFO: point = Point{x=1000, y=579}
[server] INFO: point = Point{x=1000, y=586}
[server] INFO: point = Point{x=1000, y=594}
[server] INFO: point = Point{x=993, y=594}
[server] INFO: point = Point{x=993, y=601}
[server] INFO: point = Point{x=985, y=608}
[server] INFO: point = Point{x=985, y=615}
[server] INFO: point = Point{x=978, y=623}
[server] INFO: point = Point{x=978, y=630}
[server] INFO: point = Point{x=971, y=637}
[server] INFO: point = Point{x=971, y=644}
[server] INFO: point = Point{x=964, y=652}
[server] INFO: point = Point{x=964, y=659}
[server] INFO: point = Point{x=956, y=666}
[server] INFO: point = Point{x=956, y=673}
[server] INFO: point = Point{x=949, y=681}
[server] INFO: point = Point{x=949, y=688}
[server] INFO: point = Point{x=942, y=688}
[server] INFO: point = Point{x=942, y=695}
[server] INFO: point = Point{x=935, y=695}
[server] INFO: point = Point{x=935, y=702}
[server] INFO: point = Point{x=935, y=710}
[server] INFO: point = Point{x=927, y=710}
[server] INFO: point = Point{x=927, y=717}
[server] INFO: point = Point{x=927, y=724}
[server] INFO: point = Point{x=920, y=724}
[server] INFO: point = Point{x=920, y=731}
[server] INFO: point = Point{x=920, y=739}
[server] INFO: point = Point{x=913, y=739}
[server] INFO: point = Point{x=913, y=746}
[server] INFO: point = Point{x=906, y=746}
[server] INFO: point = Point{x=906, y=753}
[server] INFO: point = Point{x=898, y=760}
[server] INFO: point = Point{x=898, y=768}
[server] INFO: point = Point{x=891, y=768}
[server] INFO: point = Point{x=891, y=775}
[server] INFO: point = Point{x=884, y=775}
[server] INFO: point = Point{x=884, y=782}
[server] INFO: point = Point{x=884, y=789}
[server] INFO: point = Point{x=877, y=789}
[server] INFO: point = Point{x=877, y=797}
[server] INFO: point = Point{x=869, y=797}
[server] INFO: point = Point{x=869, y=804}
[server] INFO: point = Point{x=869, y=811}
[server] INFO: point = Point{x=862, y=811}
[server] INFO: point = Point{x=862, y=818}
[server] INFO: point = Point{x=855, y=826}
[server] INFO: point = Point{x=855, y=833}
[server] INFO: point = Point{x=848, y=833}
[server] INFO: point = Point{x=848, y=840}
[server] INFO: point = Point{x=848, y=847}
[server] INFO: point = Point{x=840, y=847}
[server] INFO: point = Point{x=840, y=855}
[server] INFO: point = Point{x=840, y=862}
[server] INFO: point = Point{x=833, y=862}
[server] INFO: point = Point{x=833, y=869}
[server] INFO: point = Point{x=826, y=869}
[server] INFO: point = Point{x=826, y=876}
[server] INFO: point = Point{x=826, y=883}
[server] INFO: point = Point{x=819, y=883}
[server] INFO: point = Point{x=819, y=891}
[server] INFO: point = Point{x=811, y=898}
[server] INFO: point = Point{x=811, y=905}
[server] INFO: point = Point{x=804, y=912}
[server] INFO: point = Point{x=804, y=920}
[server] INFO: point = Point{x=797, y=920}
[server] INFO: point = Point{x=797, y=927}
[server] INFO: point = Point{x=797, y=934}
[server] INFO: point = Point{x=797, y=941}
[server] INFO: point = Point{x=790, y=941}
[server] INFO: point = Point{x=790, y=949}
[server] INFO: point = Point{x=790, y=956}
[server] INFO: point = Point{x=790, y=963}
[server] INFO: point = Point{x=782, y=963}
[server] INFO: point = Point{x=782, y=970}
[server] INFO: point = Point{x=782, y=978}
[server] INFO: point = Point{x=775, y=978}
[server] INFO: point = Point{x=775, y=985}
[server] INFO: point = Point{x=775, y=992}
[server] INFO: point = Point{x=768, y=992}
[server] INFO: point = Point{x=768, y=999}
[server] INFO: point = Point{x=768, y=1007}
[server] INFO: point = Point{x=761, y=1007}
[server] INFO: point = Point{x=761, y=1014}
[server] INFO: point = Point{x=761, y=1021}
[server] INFO: point = Point{x=761, y=1028}
[server] INFO: point = Point{x=753, y=1028}
[server] INFO: point = Point{x=753, y=1036}
[server] INFO: point = Point{x=753, y=1043}
[server] INFO: point = Point{x=753, y=1050}
[server] INFO: point = Point{x=746, y=1050}
[server] INFO: point = Point{x=746, y=1057}
[server] INFO: point = Point{x=746, y=1065}
[server] INFO: point = Point{x=746, y=1072}
[server] INFO: point = Point{x=739, y=1072}
[server] INFO: point = Point{x=739, y=1079}
[server] INFO: point = Point{x=739, y=1086}
[server] INFO: point = Point{x=739, y=1094}
[server] INFO: point = Point{x=739, y=1101}
[server] INFO: point = Point{x=732, y=1101}
[server] INFO: point = Point{x=732, y=1108}
[server] INFO: point = Point{x=732, y=1115}
[server] INFO: point = Point{x=732, y=1123}
[server] INFO: point = Point{x=732, y=1130}
[server] INFO: point = Point{x=732, y=1137}
[server] INFO: point = Point{x=724, y=1144}
[server] INFO: point = Point{x=724, y=1152}
[server] INFO: point = Point{x=724, y=1159}
[server] INFO: point = Point{x=724, y=1166}
[server] INFO: point = Point{x=724, y=1173}
[server] INFO: point = Point{x=717, y=1181}
[server] INFO: point = Point{x=717, y=1188}
[server] INFO: point = Point{x=717, y=1195}
[server] INFO: point = Point{x=717, y=1202}
[server] INFO: point = Point{x=717, y=1210}
[server] INFO: point = Point{x=717, y=1217}
[server] INFO: point = Point{x=710, y=1217}
[server] INFO: point = Point{x=710, y=1224}
[server] INFO: point = Point{x=710, y=1239}
[server] INFO: point = Point{x=710, y=1246}
[server] INFO: point = Point{x=710, y=1253}
[server] INFO: point = Point{x=703, y=1260}
[server] INFO: point = Point{x=703, y=1268}
[server] INFO: point = Point{x=703, y=1275}
[server] INFO: point = Point{x=703, y=1282}
[server] INFO: point = Point{x=703, y=1289}
[server] INFO: point = Point{x=695, y=1296}
[server] INFO: point = Point{x=695, y=1304}
[server] INFO: point = Point{x=695, y=1311}
[server] INFO: point = Point{x=695, y=1318}
[server] INFO: point = Point{x=688, y=1318}
[server] INFO: point = Point{x=688, y=1325}
[server] INFO: point = Point{x=688, y=1333}
[server] INFO: point = Point{x=688, y=1340}
[server] INFO: point = Point{x=681, y=1340}
[server] INFO: point = Point{x=681, y=1347}
[server] INFO: point = Point{x=681, y=1354}
[server] INFO: point = Point{x=674, y=1354}
[server] INFO: point = Point{x=674, y=1362}
[server] INFO: point = Point{x=674, y=1369}
[server] INFO: point = Point{x=666, y=1369}
[server] INFO: point = Point{x=666, y=1376}
[server] INFO: point = Point{x=666, y=1376}

@rom1v
Copy link
Collaborator

rom1v commented Jul 10, 2020

OK, thank you for the results.

So the events outside the screen are correctly forwarded. Your device software just don't consider them for gestures.

So I'm closing, there is no problem on scrcpy side.

@rom1v rom1v closed this as completed Jul 10, 2020
@quangkieu
Copy link
Author

Could we rewrite the x axis inside and screen zone before sending to device?

@rom1v
Copy link
Collaborator

rom1v commented Jul 10, 2020

That would break the expected behavior on devices which correctly handle the events outside the screen :/

@quangkieu
Copy link
Author

quangkieu commented Jul 10, 2020

Then could this be a flag on startup? So it would rewrite the value of axis that is on the black zone. So if the black zone is on the x axis, then rewrite x, and opposite.

@rom1v rom1v changed the title [Swipe] from left/right edge [feature request] Add option to clamp events coordinates inside the device screen (swipe from left/right edge) Jul 10, 2020
@rom1v rom1v reopened this Jul 10, 2020
@rom1v
Copy link
Collaborator

rom1v commented Jul 10, 2020

(converted to a feature request)

@rom1v
Copy link
Collaborator

rom1v commented Jul 10, 2020

Btw, what happens if you open some gallery app, and swipe the photo until outside the device screen, does it continue to move it?

@quangkieu
Copy link
Author

Yeah, it would continue scrolling between photo when I start the scroll from screen to outside at end of padding zone, not outside of the app windows.
So the problem is where the swipe start, not where it end.

@rom1v
Copy link
Collaborator

rom1v commented Jul 10, 2020

So the problem is where the swipe start, not where it end.

It just depends how each app decided to handle the out-of-bounds events.

@quangkieu
Copy link
Author

quangkieu commented Jul 10, 2020

Well, i am not android developer so i would take your god words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants