]> git.mdlowis.com Git - proto/labwc.git/commitdiff
client list combines fix empty title
authorDroc <japhack@yahoo.com>
Thu, 19 Sep 2024 19:53:12 +0000 (14:53 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 19 Sep 2024 19:57:39 +0000 (20:57 +0100)
this adds a check for title being null or empty as well as
existence of toplevel.handle

src/menu/menu.c

index 94b7b3f347c320389d09975750675fe44a0ca60c..69bc6f39e120491dc24694ceb9c1be5778016a9a 100644 (file)
@@ -1001,10 +1001,15 @@ update_client_list_combined_menu(struct server *server)
 
                wl_list_for_each(view, &server->views, link) {
                        if (view->workspace == workspace) {
+                               const char *title = view_get_string_prop(view, "title");
+                               if (!view->toplevel.handle || string_null_or_empty(title)) {
+                                       continue;
+                               }
+
                                if (view == server->active_view) {
                                        buf_add(&buffer, "*");
                                }
-                               buf_add(&buffer, view_get_string_prop(view, "title"));
+                               buf_add(&buffer, title);
 
                                current_item = item_create(menu, buffer.data, /*show arrow*/ false);
                                current_item->id = xstrdup(menu->id);