Show class/name if window is unnamed
[mikachu/openbox.git] / openbox / client.c
index f110a66..1d2391a 100644 (file)
@@ -2111,8 +2111,14 @@ void client_update_title(ObClient *self)
    http://developer.gnome.org/projects/gup/hig/draft_hig_new/windows-alert.html
    */
                 data = g_strdup("");
-            } else
-                data = g_strdup(_("Unnamed Window"));
+            } else {
+                if (self->class && *self->class)
+                    data = g_strdup(self->class);
+                else if (self->name && *self->name)
+                    data = g_strdup(self->name);
+                else
+                    data = g_strdup(_("Unnamed Window"));
+            }
         }
     }
     self->original_title = g_strdup(data);