Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gestures: Add more details and introduce on_gesture_handled #2168

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

leolost2605
Copy link
Member

@leolost2605 leolost2605 commented Dec 15, 2024

Add information about whether a gesture will be handled. This might be used to determine whether events are supposed to be consumed. Add information about the origin of a gesture. This might be used to determine whether a gesture should be handled (e.g. only allow swipe from screen edge). Add common GestureBackend interface that all backends have to implement. Add a on_gesture_handled signal to the GestureTracker which runs if and only if true was returned in on_gesture_detected. Before it is emitted prepare_gesture_handling will be called on the backend. This will be needed for the upcoming PanBackend to avoid conflicts in event consuming.
Add a utility get_action to the GestureSettings that gets the corresponding action for a gesture. This allows to remove some duplicated code.

Split out from #2096
These changes are generic cleanup, get rid of some META_CURRENT_TIME used to choose focus window warnings and are required for a touchpad backend in gala as well.

Use rebase to merge

@leolost2605 leolost2605 requested a review from a team December 15, 2024 14:50
Add information about whether a gesture will be handled. This might be used to
determine whether events are supposed to be consumed.
Add information about the origin of a gesture. This might be used to determine
whether a gesture should be handled (e.g. only allow swipe from screen edge).
Add common GestureBackend interface that all backends have to implement.
Add a on_gesture_handled signal to the GestureTracker which runs if and only if
true was returned in on_gesture_detected. Before it is emitted prepare_gesture_handling
will be called on the backend. This will be needed for the upcoming PanBackend to avoid
conflicts in event consuming.
Add a utility get_action to the GestureSettings that gets the corresponding action for a gesture.
This allows to remove some duplicated code.
@leolost2605 leolost2605 force-pushed the leolost/gesture-preparations branch from ed01957 to 0b66e9f Compare December 15, 2024 15:01
Copy link
Member

@lenemter lenemter left a comment

Choose a reason for hiding this comment

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

LGTM

@lenemter lenemter merged commit 0e82d63 into main Dec 19, 2024
5 checks passed
@lenemter lenemter deleted the leolost/gesture-preparations branch December 19, 2024 20:27
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.

2 participants