scrcpy/server
Romain Vimont 75ce0b5c3f Forward DOWN and UP separately for right-click
The shortcut "back on screen on" is a bit special: the control is
requested by the client, but the actual event injection (POWER or BACK)
is determined on the device.

To properly inject DOWN and UP events for BACK, transmit the action as
a control parameter.

If the screen is off:
 - on DOWN, inject POWER (DOWN and UP) (wake up the device immediately)
 - on UP, do nothing
If the screen is on:
 - on DOWN, inject BACK DOWN
 - on UP, inject BACK UP

A corner case is when the screen turns off between the DOWN and UP
event. In that case, a BACK UP event will be injected, so it's harmless.

With this change, the actual BACK is handled by Android on UP on the
device (instead of DOWN). This is consistent with the keyboard shortcut
(Mod+b) behavior.
2021-04-16 18:51:57 +02:00
..
scripts Use "/usr/bin/env bash" for build-wrapper.sh 2020-09-15 13:44:02 +02:00
src Forward DOWN and UP separately for right-click 2021-04-16 18:51:57 +02:00
.gitignore Convert server to an Android project 2018-01-30 12:01:36 +01:00
build.gradle Bump version to 1.17 2021-01-02 00:53:32 +01:00
build_without_gradle.sh Bump version to 1.17 2021-01-02 00:53:32 +01:00
meson.build Require Meson 0.48 to get rid of warnings 2020-04-13 22:47:03 +02:00
proguard-rules.pro Convert server to an Android project 2018-01-30 12:01:36 +01:00