From: <wa...@us...> - 2012-06-24 16:45:08
|
Revision: 11333 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=11333&view=rev Author: wardje Date: 2012-06-24 16:45:01 +0000 (Sun, 24 Jun 2012) Log Message: ----------- Set window manager class hints in Linux. Class and instance set to "SuperTuxKart". Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2012-06-24 16:40:08 UTC (rev 11332) +++ main/trunk/src/graphics/irr_driver.cpp 2012-06-24 16:45:01 UTC (rev 11333) @@ -62,6 +62,7 @@ namespace X11 { #include <X11/Xlib.h> + #include <X11/Xutil.h> } #endif @@ -354,6 +355,18 @@ #endif } + +#if defined(__linux__) + using namespace X11; + const SExposedVideoData& videoData = m_device->getVideoDriver()->getExposedVideoData(); + XClassHint* classhint = XAllocClassHint(); + classhint->res_name = (char*)"SuperTuxKart"; + classhint->res_class = (char*)"SuperTuxKart"; + XSetClassHint((Display*)videoData.OpenGLLinux.X11Display, + videoData.OpenGLLinux.X11Window, + classhint); + XFree(classhint); +#endif m_scene_manager = m_device->getSceneManager(); m_gui_env = m_device->getGUIEnvironment(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |