From 9dadfe7a685e0f65e5ae9b61eafcd8bd7e778103 Mon Sep 17 00:00:00 2001 From: Tamas TEVESZ Date: Thu, 18 Mar 2010 17:21:42 +0100 Subject: [PATCH] Sensible defaults In the wmaker-dev list, Iain noted that: "I can see the benefit of this. I know of at least two applications[1] which don't bother to set a class and instance. Early versions of my OS X cycling patch for Window Maker caused a crash when faced with such windows because I forgot to check that these properties existed. Nowadays it just refuses to do the cycling. Also Window Maker won't let you save attributes on such windows from the Inspector. [1] Interestingly they are competiting commercial applications: No Machine and Exceed onDemand." [crmafra: edit commit log] --- src/properties.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/properties.c b/src/properties.c index 82a3cb4b..f4ef1739 100644 --- a/src/properties.c +++ b/src/properties.c @@ -72,8 +72,8 @@ int PropGetWMClass(Window window, char **wm_class, char **wm_instance) class_hint = XAllocClassHint(); if (XGetClassHint(dpy, window, class_hint) == 0) { - *wm_class = NULL; - *wm_instance = NULL; + *wm_class = strdup("default"); + *wm_instance = strdup("default"); XFree(class_hint); return False; }