Skip to content

Touchpad-style cursor control and crisp zoom#78

Open
rebelancap wants to merge 2 commits into
hugeBlack:mainfrom
rebelancap:feature/touch-zoom-improvements
Open

Touchpad-style cursor control and crisp zoom#78
rebelancap wants to merge 2 commits into
hugeBlack:mainfrom
rebelancap:feature/touch-zoom-improvements

Conversation

@rebelancap

Copy link
Copy Markdown

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant