mirror of
https://github.com/labwc/labwc.git
synced 2026-04-07 08:21:20 -04:00
[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:
parent
9f5ff391cc
commit
97f5f93812
4 changed files with 64 additions and 1 deletions
|
|
@ -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 *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue