{"action":"closed","issue":{"url":"https://api.github.com/repos/herbstluftwm/herbstluftwm/issues/58","labels_url":"https://api.github.com/repos/herbstluftwm/herbstluftwm/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/herbstluftwm/herbstluftwm/issues/58/comments","events_url":"https://api.github.com/repos/herbstluftwm/herbstluftwm/issues/58/events","html_url":"https://github.com/herbstluftwm/herbstluftwm/issues/58","id":113385114,"number":58,"title":"Update focus objects when removing a tag","user":{"login":"ctx","id":552898,"avatar_url":"https://avatars.githubusercontent.com/u/552898?v=3","gravatar_id":"","url":"https://api.github.com/users/ctx","html_url":"https://github.com/ctx","followers_url":"https://api.github.com/users/ctx/followers","following_url":"https://api.github.com/users/ctx/following{/other_user}","gists_url":"https://api.github.com/users/ctx/gists{/gist_id}","starred_url":"https://api.github.com/users/ctx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctx/subscriptions","organizations_url":"https://api.github.com/users/ctx/orgs","repos_url":"https://api.github.com/users/ctx/repos","events_url":"https://api.github.com/users/ctx/events{/privacy}","received_events_url":"https://api.github.com/users/ctx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/herbstluftwm/herbstluftwm/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"t-wissmann","id":9048813,"avatar_url":"https://avatars.githubusercontent.com/u/9048813?v=3","gravatar_id":"","url":"https://api.github.com/users/t-wissmann","html_url":"https://github.com/t-wissmann","followers_url":"https://api.github.com/users/t-wissmann/followers","following_url":"https://api.github.com/users/t-wissmann/following{/other_user}","gists_url":"https://api.github.com/users/t-wissmann/gists{/gist_id}","starred_url":"https://api.github.com/users/t-wissmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-wissmann/subscriptions","organizations_url":"https://api.github.com/users/t-wissmann/orgs","repos_url":"https://api.github.com/users/t-wissmann/repos","events_url":"https://api.github.com/users/t-wissmann/events{/privacy}","received_events_url":"https://api.github.com/users/t-wissmann/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-10-26T15:48:41Z","updated_at":"2015-11-16T13:13:31Z","closed_at":"2015-11-16T13:13:31Z","body":"When you remove a tag the tags.focus object gets deleted:\r\n\r\nSee the bug in action:\r\n```shell\r\n$ herbstclient chain , add testtag , merge_tag testtag\r\n$ herbstclient attr tags.focus.name\r\nInvalid path \"tags.focus.name\": No child \"focus\" in object tags\r\nInvalid path \"tags.focus.name\": No child \"focus\" in object tags\r\n```\r\nAnd this patch seems to fix it:\r\n\r\n```diff\r\ndiff --git a/src/tag.cpp b/src/tag.cpp\r\nindex d731819..a041b60 100644\r\n--- a/src/tag.cpp\r\n+++ b/src/tag.cpp\r\n@@ -375,6 +375,7 @@ int tag_remove_command(int argc, char** argv, GString* output) {\r\n     ewmh_update_desktops();\r\n     ewmh_update_desktop_names();\r\n     clientlist_foreach(client_update_tag, NULL);\r\n+    tag_update_focus_objects();\r\n     tag_set_flags_dirty();\r\n     hook_emit_list(\"tag_removed\", oldname, target->name->str, NULL);\r\n     g_free(oldname);\r\n```\r\n\r\nThere would be no need for this call when you remove an unfocused tag. But I couldn't find out how the tags.focus object gets deleted."}}