typedef enum {
LAST,
+ CURRENT,
RELATIVE,
ABSOLUTE
} SwitchType;
gchar *s = obt_parse_node_string(n);
if (!g_ascii_strcasecmp(s, "last"))
o->type = LAST;
+ else if (!g_ascii_strcasecmp(s, "current"))
+ o->type = CURRENT;
else if (!g_ascii_strcasecmp(s, "next")) {
o->type = RELATIVE;
o->rel.linear = TRUE;
Options *o = options;
guint d;
-
-
switch (o->type) {
case LAST:
d = screen_last_desktop;
break;
+ case CURRENT:
+ d = screen_desktop;
+ break;
case ABSOLUTE:
d = o->abs.desktop;
break;
break;
}
- if (d < screen_num_desktops && d != screen_desktop) {
+ if (d < screen_num_desktops &&
+ (d != screen_desktop ||
+ (data->client && data->client->desktop != screen_desktop))) {
gboolean go = TRUE;
actions_client_move(data, TRUE);