Repository navigation
Deliver the panel's touch to every widget, plugins included - #26
Open
masonjmiller wants to merge 3 commits into
Open
masonjmiller wants to merge 3 commits into
masonjmiller wants to merge 3 commits into
Conversation
EdgeControl's own touch reached only native widgets with touch zones, so a plugin on the dashboard couldn't be touched at all (kemalandic#19). The usual way round it has been a system-level touch driver, which turns the panel into a mouse, fights EdgeControl for the device, moves the pointer, and needs its own login item to win the race at startup. EdgeControl now does the driver's job itself, inside its own window: - TouchGesture reads each touch the way such a driver does. A finger that lifts before it moves or rests is a tap. One that moves within 300 ms and 8 points is a swipe: sideways it pages the dashboard as before, up or down it scrolls. One that rests first is a press, and drags as it moves. - Taps on native widgets still go to their touch zones. Everything else goes to the dashboard window, through TouchEventInjector, as the mouse and scroll events a mouse or trackpad would send. A plugin gets a real click, press, drag and scroll, trusted by WebKit like any other. Native lists scroll by drag, as TouchScrollView expects; web views get scroll events. - The events go to the window directly: the pointer doesn't move, and EdgeControl doesn't come forward over the app being worked in. - Plugin views accept the first click (kemalandic#18). Without it the first touch on a plugin while another app was in front only activated EdgeControl. - The panel's own coordinates map it, from its HID descriptor (0…16,383 by 0…9,599 on a XENEON EDGE), so touch works without calibrating. The corner-dwell calibration had no settings screen and blocked touch until someone happened to hold a finger on each corner; it skews the map too, since a fingertip "in the corner" sits 30–40 points in. It now runs only when asked for. - A report's values arrive one at a time, contact before position, so a new touch was first seen where the last one ended. Samples are now passed on once the whole report is in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ring Contact came only from the panel's mouse interface, which macOS lets an app seize only with Input Monitoring. Without it, EdgeControl saw positions from the touchscreen interface but never a finger down. The touchscreen's own tip switch now counts as contact too. And the mouse interface has to be seized, or macOS keeps treating the panel as a mouse and clicks wherever its pointer lands as well. When the seize is refused for want of permission, EdgeControl asks for Input Monitoring once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every widget tile has a touch zone, so a tap can select it in edit mode or open its Opens on Tap app. Native widgets' own controls have smaller zones that win. A plugin has none, so the tile's zone took every tap on it and, with no app to open, did nothing. Now that touch reaches plugins, that zone registers only in edit mode, or for a native widget with an app to open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
EdgeControl's own touch now reaches every widget, plugins included, so a XENEON EDGE needs no system-level touch driver alongside it. Closes #18, closes #19.
Why
Taps went only to native widgets' touch zones, so a plugin couldn't be touched at all (#19). The workaround was a system-wide touch driver that turns the panel into a mouse. That driver fights EdgeControl for the device, moves the pointer, and has to win a race at login. With it running, EdgeControl also paged the dashboard under a finger dragging a plugin's slider, because both were reading the same finger.
How
TouchGesturereads each touch the way such a driver does:TouchEventInjector, as the events a mouse or trackpad would send:TouchScrollViewexpects.widget-tapzone registers only when it has a job: in edit mode, or for a native widget with an Opens on Tap app. Over a plugin it took every tap and did nothing with it.resetCalibration).Testing
xcodebuild testpasses in full: 394 Swift Testing tests in 38 suites, plus the XCTest suite. Seven are new, forTouchGestureandPanelMapping:On a XENEON EDGE (macOS 27.2), with the system touch driver uninstalled and EdgeControl holding all three of the panel's interfaces (
seize active (3/3)):Another app stayed in front throughout.
One thing to know for local builds: macOS ties Input Monitoring to the app's signature. An ad-hoc-signed build has to be added to the list by hand (Privacy & Security → Input Monitoring → +). A Developer ID build asks once.
Overlap
#22 adds a
layerparameter toTouchTappable, and this PR addsenabled. Whichever lands second takes both; it's a three-line merge.🤖 Generated with Claude Code