danakj/openbox — pull request #2 by jameh (2013-06-21 07:58:11+00:00)
Title: Keybind feature: add/remove desktop to/from index (bugzilla #5974)

See: https://bugzilla.icculus.org/show_bug.cgi?id=5974

Example usage in rc.xml:
...

4

...
will add a desktop in position 4 (one-indexed), shifting windows from
higher desktop indices up one desktop. If there are less than 3
desktops currently, the in between desktops will also be created.
...

3

...
will remove desktop at position 3 (one-indexed), moving its windows to
desktop 4. If there are exactly 3 desktops, the windows are moved to
desktop 2. If there are less than 3 desktops, nothing happens.

API changes:
screen.c:
screen_add_desktop(gboolean current); // is now
screen_add_desktop(guint index);

screen_remove_desktop(gboolean current); // is now
screen_remove_desktop(guint index);

This should be fully backwards compatible with previous scheme due to the
changes made to openbox/actions/addremovedesktop.c