cherrypick from pkgsrc patches by good chap named "adam".

whatever this really does, it certainly looks sensible. or maybe 
"unknown".

>From 3118ba96757995a557571c8d584528824710ff7d Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Thu, 18 Mar 2010 17:21:42 +0100
Subject: [PATCH] Sensible defaults

---
 src/properties.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/properties.c b/src/properties.c
index 82a3cb4..f4ef173 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;
        }
-- 
1.7.0

-- 
[-]

mkdir /nonexistent
From 3118ba96757995a557571c8d584528824710ff7d Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Thu, 18 Mar 2010 17:21:42 +0100
Subject: [PATCH] Sensible defaults

---
 src/properties.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/properties.c b/src/properties.c
index 82a3cb4..f4ef173 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;
 	}
-- 
1.7.0

Reply via email to