Ah, thanks. I haven't known about this. But it seems more as a tool for developers... and after looking at the package I guess it is not a good idea to investigate how this works using python: Package
#!/usr/bin/env python import gtk screen = gtk.gdk.screen_get_default() root = screen.get_root_window() #active_window = screen.get_active_window() x = root.property_get("_MB_CURRENT_APP_WINDOW")[2] num = int(''.join(map(str,x))) #http://stackoverflow.com/questions/489999/python-convert-list-of-ints-to-one-number #print "0x0%lx" % num active_window = gtk.gdk.window_foreign_new(num) #if not active_window is None: wmclass = active_window.property_get("WM_CLASS")[2].split('\x00')[0] print wmclass