Touchpad-style cursor control and crisp zoom#78
Open
rebelancap wants to merge 2 commits into
Open
Conversation
Centered-cursor viewport with absolute positioning, two-finger pinch-zoom and scroll, long-press click-hold drag, and flick-to-glide momentum for cursor and scroll. Adds a Scroll Speed setting.
Crisp zoom: raise the GL drawable density to match the host source while magnified so zoomed content stays sharp, gated on actual zoom scale so 1x keeps native density. Re-issue SetDimensions on scale change so the SDK fills the new drawable. Touch robustness: tap recognizers no longer delay/cancel touches so the overlay always sees the real touch lifecycle; flush touch state on resign-active; sweep an OS-orphaned ghost touch when another finger is actively moving.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Love the app, been using it more it to remotely control my Macs and PCs. Two related touch/zoom improvements here, in separate commits so they're easy to review or take independently. I've used many VNC/RDP iPhone apps over the years and think these are crucial enhancements to make OpenParsec much better at remote desktop control on touchscreen.
Centered-cursor touch control. Reworks touch input into a touchpad-style model: cursor stays centered and you move it by dragging, with two-finger pinch-zoom and scroll, long-press for click-and-drag, and a little flick-to-glide momentum. IMO, this is a much more fluid and responsive touch experience.
Crisp zoom. When you zoom in, the GL drawable density is raised to match the host's source resolution so the magnified image stays sharp instead of blurring. It's gated on actual zoom, so there's no extra GPU cost at 1×.
QoL Fixes. A few robust fixes from on-device testing: tap recognizers no longer swallow touch-end events (which could occasionally strand a phantom finger and stick the view in zoom or scroll), touch state is flushed if the app gets backgrounded mid-gesture, and a stale "ghost" touch left by a dropped OS touch-end is swept once another finger is clearly moving. Both mouse clicks and movements are now much more reliable.
Also added new settings in Interactivity: Scroll Speed and Reverse Scroll Direction.
No new dependencies, all on the existing GLKit render path. Tested on iPhone Air, iOS 72 DB2 against Mac mini and PC over LAN and Internet. Happy to split this into two PRs, change the defaults, or adjust anything you'd rather see done differently. These fixes have greatly improved my own productivity when using OpenParsec for remote desktop control.