Commit graph

5 commits

Author SHA1 Message Date
Kirill Primak
20c208d46a util/array: unclutter 2022-08-29 13:48:42 +00:00
Kenny Levinsen
724aa38fc2 util/array: Add array_realloc for wl_array
array_realloc will grow the array for the target size like wl_insert_add, but
will also shrink the array if the target size is sufficiently smaller than the
current allocation.
2022-08-19 19:38:33 +02:00
Simon Ser
a6ed4ae308 util/array: add array_remove_at 2021-07-01 10:35:39 -04:00
Ashkan Kiani
06a13203dd Use a set to track pointer button state.
In addition to `button_count`, we keep track of the current buttons
pressed just as in `wlr_keyboard`.

Add `set_add` and `set_remove` to assist with this. These functions can
only be used with values greater than 0 (such as the button/key masks
for keyboards and pointers).

Partially addresses:
- https://github.com/swaywm/wlroots/issues/1716
- https://github.com/swaywm/wlroots/issues/1593
2019-06-16 00:59:53 +03:00
Markus Ongyerth
74ca2f8fcf Another round of feedback from acrisci 2018-07-14 09:52:34 +02:00