Skip to content

Implement a touch screen backend - #2949

Open
leolost2605 wants to merge 8 commits into
mainfrom
leolost/new-touchscreen-backend
Open

leolost2605 wants to merge 8 commits into
mainfrom
leolost/new-touchscreen-backend

Conversation

@leolost2605

@leolost2605 leolost2605 commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

OS 9 doesn't package touchegg so we have to implement it ourselves. This also allows some improvements (most notably one to one finger tracking of touch screen gestures: #1272 )
See the individual commits for an easier review:

  • The first four commits are preparation:
    • we want to allow a backend to send gesture progress in different units. E.g. touchpad wants to send in percent whereas touchscreen wants to send logical pixels to make sure a swipe of an actor follows exactly the finger
    • add some more infrastructure related to getting the distance a gesture is expected to move an actor (also needed for one to one finger tracking of a touchscreen gesture)
    • some misc stuff (see commit messages)
  • then actually introduce the backend
  • and enable it in swipetrigger and globaltrigger

Fixes #1272
Fixes #1801

The new TouchScreenSwipeBackend is only available when compiled against mutter 49 or higher (because there the new pangesture was introduced), older versions have to rely on touchegg.

Changes in behavior compared to touchegg are:

  • When swiping etc. the actor tracks the finger 1:1
  • In the multitasking view you can use one finger to switch workspaces

In this PR it's currently not yet used for the edge swipe gesture but I already have a working follow up for that (#2950)

@leolost2605
leolost2605 force-pushed the leolost/new-touchscreen-backend branch 2 times, most recently from 3a2b12a to d5fe8e0 Compare October 9, 2026 15:21
@danirabbit danirabbit added this to OS 9 Oct 9, 2026
@danirabbit
danirabbit requested review from a team and lenemter October 9, 2026 15:22
@leolost2605
leolost2605 force-pushed the leolost/new-touchscreen-backend branch from c83ba07 to 5b61cc1 Compare October 11, 2026 17:38
Comment thread lib/Gestures/Targets/RootTarget.vala Outdated
Comment thread lib/Gestures/GestureController.vala
Comment thread src/Misc/Zoom.vala Outdated
}

public double get_distance (GestureAction action) {
return 500;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this value come from?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nowhere :) It's currently not used because zoom uses pinch and that's not implemented yet and even when we implement it we probably don't use it because with pinch we want to send a percentage (based on current distance between fingers and initial distance between fingers).
I kind of forgot I added that here 😅 I changed get_distance to be a virtual method and added documentation that get_distance only applies to swipe gestures

Comment thread src/Widgets/MultitaskingView/MultitaskingView.vala Outdated
@leolost2605
leolost2605 force-pushed the leolost/new-touchscreen-backend branch 2 times, most recently from 3396967 to e925d3f Compare October 11, 2026 21:29
@leolost2605
leolost2605 requested a review from lenemter October 11, 2026 21:32
@leolost2605
leolost2605 force-pushed the leolost/new-touchscreen-backend branch from e925d3f to 513f518 Compare October 13, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

Allow switching workspaces in multitasking view via swiping Multi-touch gestures on touch screen don't track 1:1

3 participants