--- 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);
}