I have had a chance to check the source code. I have found:
* The segfault is easy to fix and not related to the problem
* xdo_get_current_desktop works correctly
* xdo_set_current_desktop has a comment:
/* XXX: This should support passing a screen number */
so it looks like this is a known issue.
When using --relative, the current is read from the correct screen but
the new value is applied to the wrong one.
To use relative switching, this was the required command:
xdotool set_desktop --relative -- 1
I have never done any low level X programming but it seems to be that switching
root = RootWindow(xdo->xdpy, 0);
to be
root = XDefaultRootWindow(xdo->xdpy);
is all that is requred.
If you want I can send a patch to fix these two bugs.
John.
> --
> You received this message because you are subscribed to the Google Groups "xdotool-users" group.
> To post to this group, send email to
xdotoo...@googlegroups.com.
> To unsubscribe from this group, send email to
xdotool-user...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/xdotool-users?hl=en.
>