aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/events.c
AgeCommit message (Collapse)Author
2021-09-27backend/libinput: send hold gesture eventsJosé Expósito
Receive hold gesture events from libinput and emit the appropiate wlr_pointer signal.
2021-07-08Fix invalid uses of wl_array_for_eachSimon Ser
[1] and [2] have introduced new wl_array usage in wlroots, but contains a mistake: wl_array_for_each iterates over pointers to the wl_array entries, not over entries themselves. Fix all wl_array_for_each call sites. Name the variables "ptr" to avoid confusion. Found via ASan: ==148752==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x602000214111 in thread T0 #0 0x7f6ff2235f19 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:127 #1 0x7f6ff1c04004 in wlr_tablet_destroy ../subprojects/wlroots/types/wlr_tablet_tool.c:24 #2 0x7f6ff1b8463c in wlr_input_device_destroy ../subprojects/wlroots/types/wlr_input_device.c:51 #3 0x7f6ff1ab9941 in backend_destroy ../subprojects/wlroots/backend/wayland/backend.c:306 #4 0x7f6ff1a68323 in wlr_backend_destroy ../subprojects/wlroots/backend/backend.c:57 #5 0x7f6ff1ab36b4 in multi_backend_destroy ../subprojects/wlroots/backend/multi/backend.c:57 #6 0x7f6ff1ab417c in handle_display_destroy ../subprojects/wlroots/backend/multi/backend.c:124 #7 0x7f6ff106184e in wl_display_destroy (/usr/lib/libwayland-server.so.0+0x884e) #8 0x55cd1a77c9e5 in server_fini ../sway/server.c:218 #9 0x55cd1a77893f in main ../sway/main.c:400 #10 0x7f6ff04bdb24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #11 0x55cd1a73a7ad in _start (/home/simon/src/sway/build/sway/sway+0x33a7ad) 0x602000214111 is located 1 bytes inside of 16-byte region [0x602000214110,0x602000214120) freed by thread T0 here: #0 0x7f6ff2235f19 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:127 #1 0x7f6ff1c04004 in wlr_tablet_destroy ../subprojects/wlroots/types/wlr_tablet_tool.c:24 #2 0x7f6ff1b8463c in wlr_input_device_destroy ../subprojects/wlroots/types/wlr_input_device.c:51 #3 0x7f6ff1ab9941 in backend_destroy ../subprojects/wlroots/backend/wayland/backend.c:306 #4 0x7f6ff1a68323 in wlr_backend_destroy ../subprojects/wlroots/backend/backend.c:57 #5 0x7f6ff1ab36b4 in multi_backend_destroy ../subprojects/wlroots/backend/multi/backend.c:57 #6 0x7f6ff1ab417c in handle_display_destroy ../subprojects/wlroots/backend/multi/backend.c:124 #7 0x7f6ff106184e in wl_display_destroy (/usr/lib/libwayland-server.so.0+0x884e) previously allocated by thread T0 here: #0 0x7f6ff2236279 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145 #1 0x7f6ff1066d03 in wl_array_add (/usr/lib/libwayland-server.so.0+0xdd03) [1]: https://github.com/swaywm/wlroots/pull/3002 [2]: https://github.com/swaywm/wlroots/pull/3004
2021-07-08backend/libinput: send touch frame eventsSimon Ser
2021-07-01backend/libinput: stop using wlr_list internallySimon Ser
2019-11-20Add -Wmissing-prototypesSimon Ser
This requires functions without a prototype definition to be static. This allows to detect dead code, export less symbols and put shared functions in headers.
2019-03-19s/lid_switch/switch_deviceRyan Walklin
Rename lid_switch to switch_device to disambiguate lid and tablet mode switches.
2019-01-28Implement the pointer-gestures-unstable-v1 protocolGreg V
This protocol relays touchpad gesture events produced by libinput to supporting clients (e.g. Evince, Eye of GNOME).
2018-12-15[WIP][DONTMERGE]Add support for libinput_switch input devicesRyan Walklin
These are used primarily by laptops to signal the state of the lid (open/closed) and tablet mode if supported, based on ACPI events.
2018-09-18backend/libinput: add assertionsemersion
2018-07-14rename wlr_tablet_tool to wlr_tabletMarkus Ongyerth
The previous naming was based on the input-device capability names from libinput. With code that uses the libinput_tablet_tool and mapping into tablet-v2, this is confusing, so the name is changed to follow the names used in the protocol.
2018-07-14Use tablet_tool impl in libinput backendMarkus Ongyerth
2018-07-14backend/libinput: Manage tablet tool livetimesMarkus Ongyerth
This adds the management code to manage tablet tools lifetimes from libinput. It follows the suggestion made in the tablet-unstable-v2.xml to destroy tablet_tools once all tablets that it got into contact with were removed from the system. This is implemented via a refcount. If a tool is *not* unique, it will be destroyed on proximity out. This is libinput specific and mentioned in libinput docs that tools will not be found again, so we shouldn't keep a reference to them. Also they can't be on other tablets as well, because they cannot be tracked. The naming in this commit is a bit off (to not break things). The wlr names stay the same, tablet_tool is the libinput_device with capaiblity LIBINPUT_DEVICE_CAP_TABLET_TOOL which is more akin to "tablet" in the tablet-unstable-v2 protocol. The struct that corresponds to the tablet_tool in tablet-unstable-v2 is called tablet_tool_tool, a rename should be done at some point in the future.
2018-07-09util: add wlr_ prefix to log symbolsemersion
2018-04-29input-device: add output_name field, populate it from libinputemersion
2018-04-25Don't use the wlr_ prefix for static functionsemersion
2018-04-25Make sure we don't use others' prefixesemersion
2018-04-25Remove wlr_ prefix from local symbolsemersion
2018-03-28Remove width_mm from tablet eventsDrew DeVault
2018-03-06Add const to x11 and input interfacesScott Anderson
2018-02-19Revert "ELF Visibility"Drew DeVault
2018-02-19Explicitly export EFL symbolsScott Anderson
2018-02-12Reformat all #include directivesemersion
2018-02-12Make wlr_signal_emit_safe privateemersion
2018-02-12Remove wlr_backend.events.{output_remove,device_remove}emersion
2018-02-12Add wlr_signal_emit_safeemersion
2017-12-19libinput backend: add wlr_input_device_is_libinputDominique Martinet
2017-11-19Refactor wlr_list inside wlrootsemersion
2017-11-16Fix a bunch of mistakes detected with scan-buildemersion
2017-11-01rootston exit: fix libinput destroyDominique Martinet
The wlr_list -> wl_list rework changed 'wlr_devices' to wl_list, but missed its use on destroy.
2017-10-22Forgot to rename theseDrew DeVault
2017-10-20Replace list_t with wl_list for wlr_input_deviceHeghedus Razvan
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2017-08-16Prevent alloc errors from crashing in `list_t`Calvin Lee
This commit changes the `list_t` api so that alloc errors can be detected and worked around. Also fixes errors not found in 5cc7342
2017-08-15Merge pull request #88 from 4e554c4c/alloc_crashingDrew DeVault
Prevent alloc errors from crashing
2017-08-15Prevent alloc errors from crashingCalvin Lee
Resolves #76
2017-08-14Fix style issuesnyorain
2017-08-14Refactor out wlr_input_device_stateDominique Martinet
2017-08-13libinput backend: massive renamingDominique Martinet
- 'libinput' (backend's) to libinput_context - 'device' (libinput_device) to libinput_dev - 'dev' (wlr_device) to wlr_dev - 'devices' lists tangling of libinput devices to wlr_devices - 'devices' list of wlr_devices in backend state to wlr_device_lists
2017-08-13libinput backend: match logging for removal and addDominique Martinet
Only log removal of devices once, but also log it for devices that we do not care about.
2017-08-13libinput: remove useless get_context callDominique Martinet
That function is literally just "return event->device->seat->libinput" We do not use context, so do not fetch it.
2017-08-12Update libinput backend with new state designDrew DeVault
2017-08-12libinput: fix segfault when handling non-wlr device removalDominique Martinet
2017-08-12libinput backend: fill in handle_device_removedDominique Martinet
And fix input_remove_notify accordingly
2017-08-11Fix libinput destroy for devices with multiple capabilitiesDominique Martinet
2017-08-11Complete a few destroy functionsDominique Martinet
This adds missing free calls for: - drm outputs - libinput backend in general - final udev free - output mode state
2017-08-06Changed header paths.Scott Anderson
2017-06-21Reorganize wlr-commonDrew DeVault
2017-06-21Update everyone to use new headersDrew DeVault
2017-06-19Implement tablet padsDrew DeVault
2017-06-15Implement wlr_tablet_toolDrew DeVault
2017-06-14Flesh out touch events and add demoDrew DeVault