Dimitar Zhekov wrote:
A slight change to your patch:
... if (err == Success && result == Success) { if (type == XA_CARDINAL && format == 32 && nitems > 0) ret = current_desktop[0]; XFree (current_desktop); } gdk_display_close (display); ...
will avoid the two returns, and close the display on unsuccessful operation.
Hood catch Dimitar. An updated version of my patch is attached.
Under GDK_WINDOWING_WIN32, you can get the current desktop with the "Window Station and Desktop Functions". But it's a name, not a number.
If anyone wants to work work on this with me let me know. I have an idea for making this work but I don't have any windows machines handy.
Erik