wayfire
wayfire copied to clipboard
Touchpad gestures?
Is there a way to define touchpad/trackpad gestures to trigger commands? I would like to bring up nwggrid with a five-finger pinch. This gesture opens Launchpad on macOS and I found it quite useful :) I noticed that there are touch-related things in Garuda's default autostart, so I wondered if there was something I could use to reimplement this behaviour?
We support this only for touchscreen, though it seems a good idea to eventually support touchpads as well.
I hate discrete "do action after full gesture is complete" actions, if we're gonna do launchpad we should do it properly — have it smoothly fade in-out as you spread the fingers. (Should be doable as a general thing for any launcher — track the launched client via WAYLAND_SOCKET and attach the effect to whatever layer-shell surfaces it spawns. UPD: or there should be a custom protocol for proper support rather than this kind of janky handling…)
libinput doesn't seem ready for this gesture though. 5-finger anything seems to be completely ignored, from a quick look at the code it's probably this condition. I'll try changing that number and see if the gesture reliably registers as a pinch rather than a vertical swipe (the thumb should help I think).
UPD: hmm, actually macOS uses a 4-finger pinch with a big gap between the thumb and the 3 fingers. That actually registers pretty reliably with libinput! Unlike the 5-finger "spread from all-fingers-together" that ~~I remember from old macOS~~ is actually for "show desktop", which libinput likes to sometimes still classify as a swipe. (Which we handle in vswipe :D)
How does Gnome handle them?
How does Gnome handle them?
They probably have special code for their gestures, just as we have code for swipe gestures in the vswipe plugin.
I made a plugin with a custom protocol for making mac-launchpad-esque things (and "swipe notification center from the side of the screen" things and whatnot): https://github.com/DankBSD/wf-globalgestures
There is a sample in the repo that's a simple white surface that you can "pull in" with a 4-finger pinch-in, similar to the current mac launchpad gesture, and close with a pinch-out.
@unrelentingtech thats amazing! Do this is like a library we can add more gestures to?
The gestures themselves are determined by libinput — currently that's swipe, pinch, and hold. They are passed to wayland clients via the pointer-gestures-unstable-v1 protocol, and of course compositors can handle them too (I hope you've used the included vswipe plugin I wrote for switching workspaces already :D).
But with clients — normally only the focused client gets them, which is what we want for apps, but isn't enough for desktop UI elements that want to react to a gesture when hidden — e.g. to smoothly appear from nowhere according to a pinch (actually for the next design I'm planning for Waysmoke I'm probably going to have things that you slide from the edges / "from off-screen" onto the screen with swipes).
This is a Wayfire plugin that exposes a custom protocol to clients, which allows them to handle gestures when they aren't focused (and even have an empty input region).
So after you install and enable the plugin, it won't do anything by itself — you can play with my sample :) but then you need to take your favorite layer-shell based launcher grid program and add support to it:
- take the
wfp-global-gestures-unstable-v1.xmlfrom the repo, do codegen for it in the build system of the launcher (depends on the language etc.) - make sure it has some surface that's always there
- could be the actual layer-shell surface the UI is drawn onto, if the "hidden" state is implemented by still showing the surface but with fully transparent contents drawn and an empty input region
- could be a new dummy surface for this purpose I guess
- might not even need a role (like layer-shell) on that surface
- where it gets wayland globals, get
zwp_pointer_gestures_v1andzwfp_global_gesture_manager_v1 - register a particular gesture with a number of fingers to that surface e.g.
zwfp_global_gesture_manager_v1_request_global_gesture(global_gesture_manager, ZWFP_GLOBAL_GESTURE_MANAGER_V1_GESTURE_PINCH, 4, surface); - write a handler for that gesture, see
pinch_listenerin the sample- on the
beginevent it should initialize the layer-shell surface if using the dummy (if hidden) - on the
updateevent, gradually bring the window's transparency up if hidden (down if active), based on the event'sscale, see the sample for an example basic formula- (or scale+transparency, or position if a swipe, etc.)
- on the
endevent, decide if thescalecrossed some threshold and finish the show/hide action (ideally with animation!)
- on the
(unrelated to the launuchpad thing above, but I also realized that 3-finger drag is now possible with hold gestures, so: https://github.com/DankBSD/wf-touchpad-gesture-drag)
@valpackett
(unrelated to the launuchpad thing above, but I also realized that 3-finger drag is now possible with hold gestures, so: https://github.com/DankBSD/wf-touchpad-gesture-drag)
it fails to install? This is the error message
[18/22] Compiling C object global-gestures-sample.p/sample.c.o FAILED: global-gestures-sample.p/sample.c.o cc -Iglobal-gestures-sample.p -I. -I.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O0 -g -MD -MQ global-gestures-sample.p/sample.c.o -MF global-gestures-sample.p/sample.c.o.d -o global-gestures-sample.p/sample.c.o -c ../sample.c ../sample.c: In function ‘create_shm_buffer’: ../sample.c:40:18: warning: implicit declaration of function ‘memfd_create’ [-Wimplicit-function-declaration] 40 | int fd = memfd_create("weston-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING); | ^~~~~~~~~~~~ ../sample.c:40:48: error: ‘MFD_CLOEXEC’ undeclared (first use in this function); did you mean ‘FD_CLOEXEC’? 40 | int fd = memfd_create("weston-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING); | ^~~~~~~~~~~ | FD_CLOEXEC ../sample.c:40:48: note: each undeclared identifier is reported only once for each function it appears in ../sample.c:40:62: error: ‘MFD_ALLOW_SEALING’ undeclared (first use in this function) 40 | int fd = memfd_create("weston-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING); | ^~~~~~~~~~~~~~~~~ ../sample.c:42:55: warning: implicit declaration of function ‘strerror’; did you mean ‘perror’? [-Wimplicit-function-declaration] 42 | fprintf(stderr, "memfd_create: %s\n", strerror(errno)); | ^~~~~~~~ | perror ../sample.c:42:49: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=] 42 | fprintf(stderr, "memfd_create: %s\n", strerror(errno)); | ~^ ~~~~~~~~~~~~~~~ | | | | | int | char * | %d ../sample.c:43:17: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration] 43 | exit(-1); | ^~~~ ../sample.c:13:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ 12 | #include "wlr-layer-shell-unstable-v1-client-protocol.h" +++ |+#include <stdlib.h> 13 | ../sample.c:43:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] 43 | exit(-1); | ^~~~ ../sample.c:43:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ ../sample.c:48:23: warning: implicit declaration of function ‘posix_fallocate’ [-Wimplicit-function-declaration] 48 | ret = posix_fallocate(fd, 0, size); | ^~~~~~~~~~~~~~~ ../sample.c:51:52: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=] 51 | fprintf(stderr, "posix_fallocate: %s\n", strerror(errno)); | ~^ ~~~~~~~~~~~~~~~ | | | | | int | char * | %d ../sample.c:52:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] 52 | exit(-1); | ^~~~ ../sample.c:52:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ ../sample.c:57:41: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=] 57 | fprintf(stderr, "mmap: %s\n", strerror(errno)); | ~^ ~~~~~~~~~~~~~~~ | | | | | int | char * | %d ../sample.c:58:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] 58 | exit(-1); | ^~~~ ../sample.c:58:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ ../sample.c:65:9: warning: implicit declaration of function ‘close’; did you mean ‘fclose’? [-Wimplicit-function-declaration] 65 | close(fd); | ^~~~~ | fclose ../sample.c: In function ‘pinch_begin’: ../sample.c:109:31: warning: unused parameter ‘data’ [-Wunused-parameter] 109 | static void pinch_begin(void *data, struct zwp_pointer_gesture_pinch_v1 *gesture, | ~~~~~~^~~~ ../sample.c:109:74: warning: unused parameter ‘gesture’ [-Wunused-parameter] 109 | static void pinch_begin(void *data, struct zwp_pointer_gesture_pinch_v1 *gesture, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ../sample.c:110:34: warning: unused parameter ‘serial’ [-Wunused-parameter] 110 | uint32_t serial, uint32_t time, struct wl_surface *surface, | ~~~~~~~~~^~~~~~ ../sample.c:110:51: warning: unused parameter ‘time’ [-Wunused-parameter] 110 | uint32_t serial, uint32_t time, struct wl_surface *surface, | ~~~~~~~~~^~~~ ../sample.c:110:76: warning: unused parameter ‘surface’ [-Wunused-parameter] 110 | uint32_t serial, uint32_t time, struct wl_surface *surface, | ~~~~~~~~~~~~~~~~~~~^~~~~~~ ../sample.c:111:34: warning: unused parameter ‘fingers’ [-Wunused-parameter] 111 | uint32_t fingers) {} | ~~~~~~~~~^~~~~~~ ../sample.c: In function ‘pinch_update’: ../sample.c:113:32: warning: unused parameter ‘data’ [-Wunused-parameter] 113 | static void pinch_update(void *data, struct zwp_pointer_gesture_pinch_v1 *gesture, | ~~~~~~^~~~ ../sample.c:113:75: warning: unused parameter ‘gesture’ [-Wunused-parameter] 113 | static void pinch_update(void *data, struct zwp_pointer_gesture_pinch_v1 *gesture, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ../sample.c:114:35: warning: unused parameter ‘time’ [-Wunused-parameter] 114 | uint32_t time, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t scale, | ~~~~~~~~~^~~~ ../sample.c:114:52: warning: unused parameter ‘dx’ [-Wunused-parameter] 114 | uint32_t time, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t scale, | ~~~~~~~~~~~^~ ../sample.c:114:67: warning: unused parameter ‘dy’ [-Wunused-parameter] 114 | uint32_t time, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t scale, | ~~~~~~~~~~~^~ ../sample.c:115:37: warning: unused parameter ‘rotation’ [-Wunused-parameter] 115 | wl_fixed_t rotation) { | ~~~~~~~~~~~^~~~~~~~ ../sample.c: In function ‘pinch_end’: ../sample.c:124:29: warning: unused parameter ‘data’ [-Wunused-parameter] 124 | static void pinch_end(void *data, struct zwp_pointer_gesture_pinch_v1 *gesture, | ~~~~~~^~~~ ../sample.c:124:72: warning: unused parameter ‘gesture’ [-Wunused-parameter] 124 | static void pinch_end(void *data, struct zwp_pointer_gesture_pinch_v1 *gesture, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ../sample.c:125:32: warning: unused parameter ‘serial’ [-Wunused-parameter] 125 | uint32_t serial, uint32_t time, int32_t cancelled) { | ~~~~~~~~~^~~~~~ ../sample.c:125:49: warning: unused parameter ‘time’ [-Wunused-parameter] 125 | uint32_t serial, uint32_t time, int32_t cancelled) { | ~~~~~~~~~^~~~ ../sample.c: In function ‘seat_handle_capabilities’: ../sample.c:151:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] 151 | exit(1); | ^~~~ ../sample.c:151:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ ../sample.c:142:44: warning: unused parameter ‘data’ [-Wunused-parameter] 142 | static void seat_handle_capabilities(void *data, struct wl_seat *wl_seat, | ~~~~~~^~~~ ../sample.c: In function ‘seat_handle_name’: ../sample.c:155:36: warning: unused parameter ‘’ [-Wunused-parameter] 155 | static void seat_handle_name(void *, struct wl_seat *, const char *) {} | ~~~~~~^ ../sample.c:155:55: warning: unused parameter ‘’ [-Wunused-parameter] 155 | static void seat_handle_name(void *_, struct wl_seat *, const char *) {} | ~~~~~~~~~~~~~~~~^~ ../sample.c:155:71: warning: unused parameter ‘’ [-Wunused-parameter] 155 | static void seat_handle_name(void *, struct wl_seat *, const char *) {} | ~~~~~~~~~~~~^~~ ../sample.c: In function ‘layer_surface_configure’: ../sample.c:162:43: warning: unused parameter ‘data’ [-Wunused-parameter] 162 | static void layer_surface_configure(void *data, struct zwlr_layer_surface_v1 *surface, | ~~~~~~^~~~ ../sample.c: In function ‘layer_surface_closed’: ../sample.c:172:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] 172 | exit(1); | ^~~~ ../sample.c:172:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ ../sample.c:171:40: warning: unused parameter ‘data’ [-Wunused-parameter] 171 | static void layer_surface_closed(void *data, struct zwlr_layer_surface_v1 *surface) { | ~~~~~~^~~~ ../sample.c:171:76: warning: unused parameter ‘surface’ [-Wunused-parameter] 171 | static void layer_surface_closed(void *data, struct zwlr_layer_surface_v1 *surface) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ ../sample.c: In function ‘handle_global’: ../sample.c:182:13: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] 182 | if (strcmp(interface, wl_compositor_interface.name) == 0) { | ^~~~~~ ../sample.c:13:1: note: include ‘<string.h>’ or provide a declaration of ‘strcmp’ 12 | #include "wlr-layer-shell-unstable-v1-client-protocol.h" +++ |+#include <string.h> 13 | ../sample.c:180:33: warning: unused parameter ‘data’ [-Wunused-parameter] 180 | static void handle_global(void *data, struct wl_registry *registry, uint32_t name, | ~~~~~~^~~~ ../sample.c: In function ‘handle_global_remove’: ../sample.c:205:40: warning: unused parameter ‘’ [-Wunused-parameter] 205 | static void handle_global_remove(void *, struct wl_registry *, uint32_t ) {} | ~~~~~~^ ../sample.c:205:63: warning: unused parameter ‘’ [-Wunused-parameter] 205 | static void handle_global_remove(void *, struct wl_registry *, uint32_t ) {} | ~~~~~~~~~~~~~~~~~~~~^~ ../sample.c:205:76: warning: unused parameter ‘’ [-Wunused-parameter] 205 | static void handle_global_remove(void *, struct wl_registry *__, uint32_t ___) {} | ~~~~~~~~~^~~ ../sample.c: In function ‘main’: ../sample.c:219:15: warning: type defaults to ‘int’ in declaration of ‘registry’ [-Wimplicit-int] 219 | auto *registry = wl_display_get_registry(display); | ^~~~~~~~ ../sample.c:219:26: warning: initialization of ‘int *’ from incompatible pointer type ‘struct wl_registry *’ [-Wincompatible-pointer-types] 219 | auto *registry = wl_display_get_registry(display); | ^~~~~~~~~~~~~~~~~~~~~~~ ../sample.c:220:34: warning: passing argument 1 of ‘wl_registry_add_listener’ from incompatible pointer type [-Wincompatible-pointer-types] 220 | wl_registry_add_listener(registry, ®istry_listener, NULL); | ^~~~~~~~ | | | int * In file included from /usr/include/wayland-client.h:40, from ../sample.c:7: /usr/include/wayland-client-protocol.h:1126:46: note: expected ‘struct wl_registry *’ but argument is of type ‘int *’ 1126 | wl_registry_add_listener(struct wl_registry *wl_registry, | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ ../sample.c:212:14: warning: unused parameter ‘argc’ [-Wunused-parameter] 212 | int main(int argc, char **argv) { | ~~~~^~~~ ../sample.c:212:27: warning: unused parameter ‘argv’ [-Wunused-parameter] 212 | int main(int argc, char **argv) { | ~~~~~~~^~~~ [19/22] Compiling C++ object libglobalgestures.so.p/globalgestures.cpp.o FAILED: libglobalgestures.so.p/globalgestures.cpp.o c++ -Ilibglobalgestures.so.p -I. -I.. -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/pixman-1 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/libdrm -I/usr/include/libevdev-1.0 -I/usr/include/libxml2 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++17 -O0 -g -fPIC -pthread -MD -MQ libglobalgestures.so.p/globalgestures.cpp.o -MF libglobalgestures.so.p/globalgestures.cpp.o.d -o libglobalgestures.so.p/globalgestures.cpp.o -c ../globalgestures.cpp ../globalgestures.cpp: In lambda function: ../globalgestures.cpp:33:45: error: ‘wlr_event_pointer_swipe_begin’ was not declared in this scope 33 | auto ev = static_cast<event<wlr_event_pointer_swipe_begin> *>(data)->event; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../globalgestures.cpp:33:74: error: template argument 1 is invalid 33 | auto ev = static_cast<event<wlr_event_pointer_swipe_begin> >(data)->event; | ^ ../globalgestures.cpp:33:76: error: expected ‘>’ before ‘’ token 33 | auto ev = static_cast<event<wlr_event_pointer_swipe_begin> >(data)->event; | ^ ../globalgestures.cpp:33:76: error: expected ‘(’ before ‘’ token ../globalgestures.cpp:33:77: error: expected primary-expression before ‘>’ token 33 | auto ev = static_cast<event<wlr_event_pointer_swipe_begin> *>(data)->event; | ^ ../globalgestures.cpp:33:86: error: ‘struct wf::signal_data_t’ has no member named ‘event’ 33 | auto ev = static_cast<event<wlr_event_pointer_swipe_begin> *>(data)->event; | ^~~~~ ../globalgestures.cpp:33:91: error: expected ‘)’ before ‘;’ token 33 | auto ev = static_cast<event<wlr_event_pointer_swipe_begin> *>(data)->event; | ^ ../globalgestures.cpp: In lambda function: ../globalgestures.cpp:46:45: error: ‘wlr_event_pointer_swipe_update’ was not declared in this scope; did you mean ‘wl_event_source_timer_update’? 46 | auto ev = static_cast<event<wlr_event_pointer_swipe_update> *>(data)->event; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | wl_event_source_timer_update ../globalgestures.cpp:46:75: error: template argument 1 is invalid 46 | auto ev = static_cast<event<wlr_event_pointer_swipe_update> >(data)->event; | ^ ../globalgestures.cpp:46:77: error: expected ‘>’ before ‘’ token 46 | auto ev = static_cast<event<wlr_event_pointer_swipe_update> >(data)->event; | ^ ../globalgestures.cpp:46:77: error: expected ‘(’ before ‘’ token ../globalgestures.cpp:46:78: error: expected primary-expression before ‘>’ token 46 | auto ev = static_cast<event<wlr_event_pointer_swipe_update> *>(data)->event; | ^ ../globalgestures.cpp:46:87: error: ‘struct wf::signal_data_t’ has no member named ‘event’ 46 | auto ev = static_cast<event<wlr_event_pointer_swipe_update> *>(data)->event; | ^~~~~ ../globalgestures.cpp:46:92: error: expected ‘)’ before ‘;’ token 46 | auto ev = static_cast<event<wlr_event_pointer_swipe_update> *>(data)->event; | ^ ../globalgestures.cpp: In lambda function: ../globalgestures.cpp:58:45: error: ‘wlr_event_pointer_swipe_end’ was not declared in this scope 58 | auto ev = static_cast<event<wlr_event_pointer_swipe_end> *>(data)->event; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../globalgestures.cpp:58:72: error: template argument 1 is invalid 58 | auto ev = static_cast<event<wlr_event_pointer_swipe_end> >(data)->event; | ^ ../globalgestures.cpp:58:74: error: expected ‘>’ before ‘’ token 58 | auto ev = static_cast<event<wlr_event_pointer_swipe_end> >(data)->event; | ^ ../globalgestures.cpp:58:74: error: expected ‘(’ before ‘’ token ../globalgestures.cpp:58:75: error: expected primary-expression before ‘>’ token 58 | auto ev = static_cast<event<wlr_event_pointer_swipe_end> *>(data)->event; | ^ ../globalgestures.cpp:58:84: error: ‘struct wf::signal_data_t’ has no member named ‘event’ 58 | auto ev = static_cast<event<wlr_event_pointer_swipe_end> *>(data)->event; | ^~~~~ ../globalgestures.cpp:58:89: error: expected ‘)’ before ‘;’ token 58 | auto ev = static_cast<event<wlr_event_pointer_swipe_end> *>(data)->event; | ^ ../globalgestures.cpp: In lambda function: ../globalgestures.cpp:68:45: error: ‘wlr_event_pointer_pinch_begin’ was not declared in this scope 68 | auto ev = static_cast<event<wlr_event_pointer_pinch_begin> *>(data)->event; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../globalgestures.cpp:68:74: error: template argument 1 is invalid 68 | auto ev = static_cast<event<wlr_event_pointer_pinch_begin> >(data)->event; | ^ ../globalgestures.cpp:68:76: error: expected ‘>’ before ‘’ token 68 | auto ev = static_cast<event<wlr_event_pointer_pinch_begin> >(data)->event; | ^ ../globalgestures.cpp:68:76: error: expected ‘(’ before ‘’ token ../globalgestures.cpp:68:77: error: expected primary-expression before ‘>’ token 68 | auto ev = static_cast<event<wlr_event_pointer_pinch_begin> *>(data)->event; | ^ ../globalgestures.cpp:68:86: error: ‘struct wf::signal_data_t’ has no member named ‘event’ 68 | auto ev = static_cast<event<wlr_event_pointer_pinch_begin> *>(data)->event; | ^~~~~ ../globalgestures.cpp:68:91: error: expected ‘)’ before ‘;’ token 68 | auto ev = static_cast<event<wlr_event_pointer_pinch_begin> *>(data)->event; | ^ ../globalgestures.cpp: In lambda function: ../globalgestures.cpp:81:45: error: ‘wlr_event_pointer_pinch_update’ was not declared in this scope; did you mean ‘wl_event_source_timer_update’? 81 | auto ev = static_cast<event<wlr_event_pointer_pinch_update> *>(data)->event; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | wl_event_source_timer_update ../globalgestures.cpp:81:75: error: template argument 1 is invalid 81 | auto ev = static_cast<event<wlr_event_pointer_pinch_update> >(data)->event; | ^ ../globalgestures.cpp:81:77: error: expected ‘>’ before ‘’ token 81 | auto ev = static_cast<event<wlr_event_pointer_pinch_update> >(data)->event; | ^ ../globalgestures.cpp:81:77: error: expected ‘(’ before ‘’ token ../globalgestures.cpp:81:78: error: expected primary-expression before ‘>’ token 81 | auto ev = static_cast<event<wlr_event_pointer_pinch_update> *>(data)->event; | ^ ../globalgestures.cpp:81:87: error: ‘struct wf::signal_data_t’ has no member named ‘event’ 81 | auto ev = static_cast<event<wlr_event_pointer_pinch_update> *>(data)->event; | ^~~~~ ../globalgestures.cpp:81:92: error: expected ‘)’ before ‘;’ token 81 | auto ev = static_cast<event<wlr_event_pointer_pinch_update> *>(data)->event; | ^ ../globalgestures.cpp: In lambda function: ../globalgestures.cpp:94:45: error: ‘wlr_event_pointer_pinch_end’ was not declared in this scope 94 | auto ev = static_cast<event<wlr_event_pointer_pinch_end> *>(data)->event; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../globalgestures.cpp:94:72: error: template argument 1 is invalid 94 | auto ev = static_cast<event<wlr_event_pointer_pinch_end> >(data)->event; | ^ ../globalgestures.cpp:94:74: error: expected ‘>’ before ‘’ token 94 | auto ev = static_cast<event<wlr_event_pointer_pinch_end> >(data)->event; | ^ ../globalgestures.cpp:94:74: error: expected ‘(’ before ‘’ token ../globalgestures.cpp:94:75: error: expected primary-expression before ‘>’ token 94 | auto ev = static_cast<event<wlr_event_pointer_pinch_end> *>(data)->event; | ^ ../globalgestures.cpp:94:84: error: ‘struct wf::signal_data_t’ has no member named ‘event’ 94 | auto ev = static_cast<event<wlr_event_pointer_pinch_end> *>(data)->event; | ^~~~~ ../globalgestures.cpp:94:89: error: expected ‘)’ before ‘;’ token 94 | auto ev = static_cast<event<wlr_event_pointer_pinch_end> *>(data)->event; | ^ ../globalgestures.cpp: In lambda function: ../globalgestures.cpp:104:45: error: ‘wlr_event_pointer_hold_begin’ was not declared in this scope 104 | auto ev = static_cast<event<wlr_event_pointer_hold_begin> *>(data)->event; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../globalgestures.cpp:104:73: error: template argument 1 is invalid 104 | auto ev = static_cast<event<wlr_event_pointer_hold_begin> >(data)->event; | ^ ../globalgestures.cpp:104:75: error: expected ‘>’ before ‘’ token 104 | auto ev = static_cast<event<wlr_event_pointer_hold_begin> >(data)->event; | ^ ../globalgestures.cpp:104:75: error: expected ‘(’ before ‘’ token ../globalgestures.cpp:104:76: error: expected primary-expression before ‘>’ token 104 | auto ev = static_cast<event<wlr_event_pointer_hold_begin> *>(data)->event; | ^ ../globalgestures.cpp:104:85: error: ‘struct wf::signal_data_t’ has no member named ‘event’ 104 | auto ev = static_cast<event<wlr_event_pointer_hold_begin> *>(data)->event; | ^~~~~ ../globalgestures.cpp:104:90: error: expected ‘)’ before ‘;’ token 104 | auto ev = static_cast<event<wlr_event_pointer_hold_begin> *>(data)->event; | ^ ../globalgestures.cpp: In lambda function: ../globalgestures.cpp:117:45: error: ‘wlr_event_pointer_hold_end’ was not declared in this scope 117 | auto ev = static_cast<event<wlr_event_pointer_hold_end> *>(data)->event; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ../globalgestures.cpp:117:71: error: template argument 1 is invalid 117 | auto ev = static_cast<event<wlr_event_pointer_hold_end> >(data)->event; | ^ ../globalgestures.cpp:117:73: error: expected ‘>’ before ‘’ token 117 | auto ev = static_cast<event<wlr_event_pointer_hold_end> >(data)->event; | ^ ../globalgestures.cpp:117:73: error: expected ‘(’ before ‘’ token ../globalgestures.cpp:117:74: error: expected primary-expression before ‘>’ token 117 | auto ev = static_cast<event<wlr_event_pointer_hold_end> >(data)->event; | ^ ../globalgestures.cpp:117:83: error: ‘struct wf::signal_data_t’ has no member named ‘event’ 117 | auto ev = static_cast<event<wlr_event_pointer_hold_end> >(data)->event; | ^~~~~ ../globalgestures.cpp:117:88: error: expected ‘)’ before ‘;’ token 117 | auto ev = static_cast<event<wlr_event_pointer_hold_end> >(data)->event; | ^ ../globalgestures.cpp: In function ‘void destroy_impl(wl_client, wl_resource)’: ../globalgestures.cpp:160:37: warning: unused parameter ‘client’ [-Wunused-parameter] 160 | static void destroy_impl(wl_client client, wl_resource resource) { | ~~~~~~~~~~~^~~~~~ ../globalgestures.cpp: In function ‘void request_global_gesture_impl(wl_client, wl_resource, uint32_t, uint32_t, wl_resource, uint32_t)’: ../globalgestures.cpp:167:73: warning: unused parameter ‘resource’ [-Wunused-parameter] 167 | static void request_global_gesture_impl(wl_client client, wl_resource resource, | ~~~~~~~~~~~~~^~~~~~~~ ../globalgestures.cpp: In function ‘void bind_zwfp_global_gesture_manager_v1(wl_client, void, uint32_t, uint32_t)’: ../globalgestures.cpp:181:67: warning: unused parameter ‘data’ [-Wunused-parameter] 181 | void bind_zwfp_global_gesture_manager_v1(wl_client *client, void *data, uint32_t version, | ~~~~~~^~~~ ../globalgestures.cpp:181:82: warning: unused parameter ‘version’ [-Wunused-parameter] 181 | void bind_zwfp_global_gesture_manager_v1(wl_client *client, void *data, uint32_t version, | ~~~~~~~~~^~~~~~~ ninja: build stopped: subcommand failed.
@biscuitrescue yeah, it's been last updated a year ago as you can see in the repo. Sorry, I'm not maintaining my wayfire stuff right now; you're welcome to try to fix it and send a pull request :)
sure ill try to look into it as soon as my exams are done
There seem to be two separate issues discussed here:
- Discrete touchpad gestures (i.e for a command binding) - this is possible to do with a plugin by defining a custom binding type and then handling the signals, see #2247
- Continuous touchpad gestures: the idea is that the animation follows the movement of the user's fingers on the touchpad. This will require custom code in all plugins where we want this. I do not plan to implement that unless someone sends a PR.
Well, worth noting also that I made vswipe ages ago that's (IMO) the most important continuous gesture, and prototyped a plugin (probably out of date with the API by now) for passing continuous gestures to a layer-shell client (: