[Bf-committers] Small patch to source

Kent Mein bf-committers@blender.org
Tue, 5 Nov 2002 10:10:03 -0600


Is it ok to commit the following diff?

Basically it sets WM_Class for some of the windowmanagers that were 
complaining.

I know its not really something we should be working on but I figured its
small and I didn't spend any time on it :)
(sgefant did it)

More info on it can be found here:
http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&p=2153#2153

Kent

P.S. won't hurt my feelings if we just ignore it and wait for crap like this
until later. ;)

===================================================================
RCS file: /usr/src/cvsroot/blender/intern/ghost/intern/GHOST_WindowX11.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- blender/intern/ghost/intern/GHOST_WindowX11.cpp2002/10/17 05:39:481.1
+++ blender/intern/ghost/intern/GHOST_WindowX11.cpp2002/10/28 13:47:151.2
@@ -1,5 +1,5 @@
 /**
- * $Id: GHOST_WindowX11.cpp,v 1.1 2002/10/17 05:39:48 desaster Exp $
+ * $Id: GHOST_WindowX11.cpp,v 1.2 2002/10/28 13:47:15 sgefant Exp $
  * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
@@ -178,6 +178,16 @@
 xsizehints->height = height;
 XSetWMNormalHints(m_display, m_window, xsizehints);
 XFree(xsizehints);
+
+XClassHint * xclasshint = XAllocClassHint();
+int len = title.Length() +1 ;
+char *wmclass = (char *)malloc(sizeof(char) * len);
+strncpy(wmclass, (const char*)title, sizeof(char) * len);
+xclasshint->res_name = wmclass;
+xclasshint->res_class = wmclass;
+XSetClassHint(m_display, m_window, xclasshint);
+free(wmclass);
+XFree(xclasshint);

 setTitle(title);