mirror of
https://github.com/swaywm/sway.git
synced 2026-05-03 06:46:26 -04:00
gaps improvements
This commit is contained in:
parent
abcc2ef9eb
commit
8fdf85fee0
128 changed files with 1670 additions and 2718 deletions
|
|
@ -2,7 +2,6 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "log.h"
|
||||
|
||||
list_t *create_list(void) {
|
||||
list_t *list = malloc(sizeof(list_t));
|
||||
|
|
@ -83,20 +82,6 @@ void list_swap(list_t *list, int src, int dest) {
|
|||
list->items[dest] = tmp;
|
||||
}
|
||||
|
||||
void list_move_to_end(list_t *list, void *item) {
|
||||
int i;
|
||||
for (i = 0; i < list->length; ++i) {
|
||||
if (list->items[i] == item) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!sway_assert(i < list->length, "Item not found in list")) {
|
||||
return;
|
||||
}
|
||||
list_del(list, i);
|
||||
list_add(list, item);
|
||||
}
|
||||
|
||||
static void list_rotate(list_t *list, int from, int to) {
|
||||
void *tmp = list->items[to];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue