From 9fc736f4e1804b06538191786500f927ba0cda13 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 31 Oct 2018 21:27:38 +1000 Subject: Move view marks properties to container struct Like border properties, this will be needed to implement layout saving and restoring. --- sway/ipc-server.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sway/ipc-server.c') diff --git a/sway/ipc-server.c b/sway/ipc-server.c index 21f431be..6466d263 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c @@ -563,11 +563,9 @@ static void ipc_get_workspaces_callback(struct sway_workspace *workspace, static void ipc_get_marks_callback(struct sway_container *con, void *data) { json_object *marks = (json_object *)data; - if (con->view && con->view->marks) { - for (int i = 0; i < con->view->marks->length; ++i) { - char *mark = (char *)con->view->marks->items[i]; - json_object_array_add(marks, json_object_new_string(mark)); - } + for (int i = 0; i < con->marks->length; ++i) { + char *mark = (char *)con->marks->items[i]; + json_object_array_add(marks, json_object_new_string(mark)); } } -- cgit v1.2.3