diff --git a/fvwm/virtual.c b/fvwm/virtual.c index c3ae9dcb2..3bd4615bc 100644 --- a/fvwm/virtual.c +++ b/fvwm/virtual.c @@ -2563,7 +2563,6 @@ void CMD_GotoDesk(F_CMD_ARGS) struct monitor *m, *m_loop; char *next, *token; int new_desk; - int val[2]; /* We've received something like: * @@ -2571,25 +2570,14 @@ void CMD_GotoDesk(F_CMD_ARGS) * * But no monitor token. Use the current monitor. */ - if (GetIntegerArguments(action, NULL, val, 2) == 2) { - xasprintf(&action, "%s %d %d", - monitor_get_current()->si->name, val[0], val[1]); - - val[0] = -1; - val[1] = -1; - } token = PeekToken(action, &next); m = monitor_resolve_name(token); - if (m != NULL) - { - action = next; - } - else - { + if (m == NULL) { m = monitor_get_current(); + next = action; } - new_desk = GetDeskNumber(m, action, m->virtual_scr.CurrentDesk); + new_desk = GetDeskNumber(m, next, m->virtual_scr.CurrentDesk); if (is_tracking_shared) { /* Check to see if this monitor is requesting a desktop which