Commits

illume committed 10279e3

When running under X11, always set the SDL window WM_CLASS to make the
window managers correctly match the pygame window.

Thanks Marco Trevisan, and the ubuntu patches.

  • Participants
  • Parent commits c532c25

Comments (0)

Files changed (1)

         except:
             pass
 
+# when running under X11, always set the SDL window WM_CLASS to make the
+# window managers correctly match the pygame window.
+if 'DISPLAY' in os.environ and not 'SDL_VIDEO_X11_WMCLASS' in os.environ:
+    os.environ['SDL_VIDEO_X11_WMCLASS'] = os.path.basename(sys.argv[0])
 
 class MissingModule:
     _NOT_IMPLEMENTED_ = True