I am writing some code where I need to drop down from GTK+ to Xlib. Specifically, I would like to set the icon of a toplevel window to be a window itself, rather than a pixmap, in order to write a GTK+ Window Maker dockapp.
I got this to work in C as follows:
gdkDockapp = gtk_widget_get_window(dockapp);
xDockapp = GDK_WINDOW_XID(gdkDockapp);
gdkDisplay = gdk_window_get_display(gdkDockapp);
xDisplay = GDK_DISPLAY_XDISPLAY(gdkDisplay);
wmhints.icon_window = xDockapp;
wmhints.flags = IconWindowHint;
XSetWMHints(xDisplay, xDockapp, &wmhints);
However, I am hoping to actually code my application in Python. When I try to convert the code, e.g.,
gdkDockapp = dockapp.get_window()
xDockapp = gdkDockapp.get_xid()
a long is returned rather than a Window, so I can't perform any of the Xlib functions. Any suggestions?