Inject main display events to the original display by rom1v · Pull Request #5614 · Genymobile/scrcpy (original) (raw)
This was referenced
Dec 5, 2024
added 2 commits
When mirroring a secondary display, touch and scroll events must be sent to the mirroring virtual display id (with coordinates relative to the virtual display size), rather than to the original display (with coordinates relative to the original display size).
This behavior, introduced by d193967, was also applied for the main display for consistency. However, it causes some UI elements to become unclickable.
To minimize inconveniences, restore the previous behavior when mirroring the main display: send all events to the original display id (0) with coordinates relative to the original display size.
Fixes #5545 <#5545> Fixes #5605 <#5605> Fixes #5616 <#5616> Refs #4598 <#4598> Refs #5137 <#5137> Refs #5370 <#5370> PR #5614 <#5614>
Following the changes from the previous commit, the behavior is now identical when mirroring the main display or using the SurfaceControl API.
Factorize the code to perform the initialization in a single location.
Refs #5605 <#5605> PR #5614 <#5614>
rom1v mentioned this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})