aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-08-18 09:30:13 -0400
committerGitHub <noreply@github.com>2018-08-18 09:30:13 -0400
commit5c779c11f6fc2ca214f64b905086dead170ae174 (patch)
treebf71a43528328a786be1a4de02781e6e83aea406 /sway/tree/layout.c
parentcfe205b36fba77ba64184e0c1e8dcb211a7a8904 (diff)
parent16c663ed49e3950388901f220066e4da69956dfb (diff)
Merge pull request #2481 from RyanDwyer/rename-functions
Rename container_sort_workspaces and container_wrap_children
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 2b710403..49ec806e 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -1,5 +1,4 @@
#define _POSIX_C_SOURCE 200809L
-#include <ctype.h>
#include <math.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -591,28 +590,6 @@ enum sway_container_layout container_get_default_layout(
}
}
-static int sort_workspace_cmp_qsort(const void *_a, const void *_b) {
- struct sway_container *a = *(void **)_a;
- struct sway_container *b = *(void **)_b;
- int retval = 0;
-
- if (isdigit(a->name[0]) && isdigit(b->name[0])) {
- int a_num = strtol(a->name, NULL, 10);
- int b_num = strtol(b->name, NULL, 10);
- retval = (a_num < b_num) ? -1 : (a_num > b_num);
- } else if (isdigit(a->name[0])) {
- retval = -1;
- } else if (isdigit(b->name[0])) {
- retval = 1;
- }
-
- return retval;
-}
-
-void container_sort_workspaces(struct sway_container *output) {
- list_stable_sort(output->children, sort_workspace_cmp_qsort);
-}
-
/**
* Get swayc in the direction of newly entered output.
*/