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

Initial touch support #170

Merged
merged 1 commit into from Jul 11, 2019
Merged

Initial touch support #170

merged 1 commit into from Jul 11, 2019

Conversation

sheenobu
Copy link
Contributor

@sheenobu sheenobu commented Jul 4, 2019

Listen for touch down, motion and up events.

Nind 'press' event to 'up' action. bind 'down' and 'motion'
to x and y tracking.

Implement the button press dispatching as a simple
'mocked' button press using BTN_TOUCH so it fits in
with the existing button press event structure.

Fixes #99

include/config.h Outdated Show resolved Hide resolved
Copy link
Owner

@emersion emersion left a comment

Choose a reason for hiding this comment

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

Thanks for your pull request!

notification.c Outdated Show resolved Hide resolved
notification.c Show resolved Hide resolved
wayland.c Outdated Show resolved Hide resolved
}

static void touch_handle_up(void *data, struct wl_touch *wl_touch,
uint32_t serial, uint32_t time, int32_t id) {
Copy link
Owner

Choose a reason for hiding this comment

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

Follow-up issue: handle id to add support for multitouch.

wayland.c Show resolved Hide resolved
wayland.c Show resolved Hide resolved
Copy link
Owner

@emersion emersion left a comment

Choose a reason for hiding this comment

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

This looks pretty good! One last nit :P

include/config.h Outdated Show resolved Hide resolved
Listen for touch down, motion and up events.

Bind 'press' event to 'up' action. bind 'down' and 'motion'
to x and y tracking.

Implement the button press dispatching as a simple
button press that directly calls the touch config binding.

Refactor 'button_binding' to 'binding'.

Fixes #99
@sheenobu
Copy link
Contributor Author

that was a load-bearing semicolon, re-added

diff --git a/notification.c b/notification.c
index 548b2be..3234a43 100644
--- a/notification.c
+++ b/notification.c
@@ -293,7 +293,7 @@ void notification_execute_binding(struct mako_notification *notif,
 	case MAKO_BINDING_DISMISS_ALL:
 		close_all_notifications(notif->state, MAKO_NOTIFICATION_CLOSE_DISMISSED);
 		break;
-	case MAKO_BINDING_INVOKE_DEFAULT_ACTION:
+	case MAKO_BINDING_INVOKE_DEFAULT_ACTION:;
 		struct mako_action *action;
 		wl_list_for_each(action, &notif->actions, link) {
 			if (strcmp(action->key, DEFAULT_ACTION_KEY) == 0) {

Copy link
Owner

@emersion emersion left a comment

Choose a reason for hiding this comment

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

Thanks for your patience and for your work!

@emersion emersion merged commit 9de1cf0 into emersion:master Jul 11, 2019
@emersion emersion mentioned this pull request Jul 11, 2019
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.

Touch support
2 participants