[proof-of-concept] add swipe mousebinds

Use like
```xml
<mousebind direction="Down" fingers="4" action="swipe">
	<action name="GoToDesktop" to="right" wrap="false" />
</mousebind>
<mousebind direction="Up" fingers="4" action="swipe">
	<action name="GoToDesktop" to="left" wrap="false" />
</mousebind>
```
This commit is contained in:
Consolatis 2025-05-18 04:41:57 +02:00 committed by yuiiio
parent 9f5ff391cc
commit 97f5f93812
4 changed files with 64 additions and 1 deletions

View file

@ -98,6 +98,8 @@ mousebind_event_from_str(const char *str)
return MOUSE_ACTION_DRAG;
} else if (!strcasecmp(str, "scroll")) {
return MOUSE_ACTION_SCROLL;
} else if (!strcasecmp(str, "swipe")) {
return MOUSE_ACTION_SWIPE;
}
wlr_log(WLR_ERROR, "unknown mouse action (%s)", str);
return MOUSE_ACTION_NONE;
@ -111,7 +113,8 @@ mousebind_the_same(struct mousebind *a, struct mousebind *b)
&& a->button == b->button
&& a->direction == b->direction
&& a->mouse_event == b->mouse_event
&& a->modifiers == b->modifiers;
&& a->modifiers == b->modifiers
&& a->fingers == b->fingers;
}
struct mousebind *