continue;
DLOG("relevant command = %s\n", bind->command);
char *target = bind->command + strlen("workspace ");
- /* We check if this is the workspace next/prev command. Beware: The
- * workspace names "next" and "prev" are OK, so we check before
+ /* We check if this is the workspace
+ * next/prev/next_on_output/prev_on_output/back_and_forth command.
+ * Beware: The workspace names "next", "prev", "next_on_output",
+ * "prev_on_output" and "back_and_forth" are OK, so we check before
* stripping the double quotes */
if (strncasecmp(target, "next", strlen("next")) == 0 ||
- strncasecmp(target, "prev", strlen("prev")) == 0)
+ strncasecmp(target, "prev", strlen("prev")) == 0 ||
+ strncasecmp(target, "next_on_output", strlen("next_on_output")) == 0 ||
+ strncasecmp(target, "prev_on_output", strlen("prev_on_output")) == 0 ||
+ strncasecmp(target, "back_and_forth", strlen("back_and_forth")) == 0)
continue;
if (*target == '"')
target++;
Con *next = NULL;
if (TAILQ_FIRST(&(croot->focus_head)) == output->con) {
DLOG("This output (%p) was focused! Getting next\n", output->con);
- next = con_next_focused(output->con);
+ next = focused;
DLOG("next = %p\n", next);
}
if (next) {
DLOG("now focusing next = %p\n", next);
con_focus(next);
+ workspace_show(con_get_workspace(next));
}
/* 3: move the dock clients to the first output */
disable_randr(conn);
}
- ewmh_update_workarea();
-
/* Just go through each active output and assign one workspace */
TAILQ_FOREACH(output, &outputs, outputs) {
if (!output->active)
const xcb_query_extension_reply_t *extreply;
extreply = xcb_get_extension_data(conn, &xcb_randr_id);
- if (!extreply->present)
+ if (!extreply->present) {
disable_randr(conn);
- else randr_query_outputs();
+ return;
+ } else randr_query_outputs();
if (event_base != NULL)
*event_base = extreply->first_event;