From 2e3c396ae3d10e206ccad4989fa6ee419e56ce87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 11 Sep 2013 12:00:47 -0700 Subject: [PATCH] shell: Use wl_resource_for_each() for sending out workspace status --- src/shell.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/shell.c b/src/shell.c index cd94aa5a..89153e34 100644 --- a/src/shell.c +++ b/src/shell.c @@ -717,15 +717,12 @@ workspace_translate_in(struct workspace *ws, double fraction) static void broadcast_current_workspace_state(struct desktop_shell *shell) { - struct wl_list *link; + struct wl_resource *resource; - for (link = shell->workspaces.client_list.next; - link != &shell->workspaces.client_list; - link = link->next) { - workspace_manager_send_state(wl_resource_from_link(link), + wl_resource_for_each(resource, &shell->workspaces.client_list) + workspace_manager_send_state(resource, shell->workspaces.current, shell->workspaces.num); - } } static void