mirror of
https://github.com/swaywm/sway.git
synced 2026-04-28 06:46:26 -04:00
Added --window-image option to swaylock
This allows setting window specific images.
Also Changed:
- The colored background is _always_ drawn, to prevent non-fullscreen
images from leaking information.
- Added function list_arbitrary_insert, which allows insertion to a
list at an arbitrary location less than the capacity. It silently
fails otherwise.
This commit is contained in:
parent
4ce1ab8a26
commit
1ca5453678
3 changed files with 108 additions and 33 deletions
|
|
@ -47,6 +47,14 @@ void list_insert(list_t *list, int index, void *item) {
|
|||
list->items[index] = item;
|
||||
}
|
||||
|
||||
// Added because IDK if it's safe to remove that memmove
|
||||
void list_arbitrary_insert(list_t *list, int index, void *item) {
|
||||
list_resize(list);
|
||||
if(index > list->capacity) return;
|
||||
if(list->length < index) list->length = index;
|
||||
list->items[index] = item;
|
||||
}
|
||||
|
||||
void list_del(list_t *list, int index) {
|
||||
list->length--;
|
||||
memmove(&list->items[index], &list->items[index + 1], sizeof(void*) * (list->length - index));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue