changeset 449:8a687496061f

Added an environment variable SDL_VIDEO_X11_WMCLASS
author Sam Lantinga <slouken@libsdl.org>
date Mon, 19 Aug 2002 03:40:44 +0000
parents 323c766f5a46
children 8a43e0cbf02f
files src/video/x11/SDL_x11video.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/x11/SDL_x11video.c	Mon Aug 19 03:09:25 2002 +0000
+++ b/src/video/x11/SDL_x11video.c	Mon Aug 19 03:40:44 2002 +0000
@@ -350,8 +350,12 @@
 	XClassHint *classhints;
 	classhints = XAllocClassHint();
 	if(classhints != NULL) {
-	    classhints->res_name = "SDL_App";
-	    classhints->res_class = "SDL_App";
+            char *classname = getenv("SDL_VIDEO_X11_WMCLASS");
+            if ( ! classname ) {
+                classname = "SDL_App";
+            }
+	    classhints->res_name = classname;
+	    classhints->res_class = classname;
 	    XSetClassHint(SDL_Display, WMwindow, classhints);
 	    XFree(classhints);
 	}