From 6df21fd5ff86702a9ccb2cb9cbccb60c0457b620 Mon Sep 17 00:00:00 2001 From: Maxim Ermilov Date: Fri, 5 Nov 2010 19:47:50 +0300 Subject: [PATCH] never fall back to the window title as application name https://bugzilla.gnome.org/show_bug.cgi?id=624935 --- src/shell-app-system.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/shell-app-system.c b/src/shell-app-system.c index 3bfca45aa..4bc5e454e 100644 --- a/src/shell-app-system.c +++ b/src/shell-app-system.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "shell-app-private.h" #include "shell-global.h" @@ -1004,11 +1005,12 @@ shell_app_info_get_name (ShellAppInfo *info) return g_key_file_get_locale_string (info->keyfile, DESKTOP_ENTRY_GROUP, "Name", NULL, NULL); case SHELL_APP_INFO_TYPE_WINDOW: { - char *title; - g_object_get (info->window, "title", &title, NULL); - if (!title) - title = g_strdup (""); - return title; + const char *name; + + name = meta_window_get_wm_class (info->window); + if (!name) + name = _("Unknown"); + return g_strdup (name); } } g_assert_not_reached ();