correctly sort numbered workspaces (+testcase)

Numbered workspaces (workspaces with a name containing only digits) will be
inserted in the correct order now. Named workspaces are always sorted after
numbered workspaces and in the order of creation.
This commit is contained in:
Michael Stapelberg
2010-11-21 23:35:49 +01:00
parent fab8b84db7
commit 1de97a1f1f
7 changed files with 117 additions and 6 deletions

View File

@ -269,7 +269,9 @@ IPC_HANDLER(get_workspaces) {
y(map_open);
ystr("num");
y(integer, con_num_children(ws));
if (ws->num == -1)
y(null);
else y(integer, ws->num);
ystr("name");
ystr(ws->name);