]> git.sur5r.net Git - i3/i3/blobdiff - src/workspace.c
Merge branch 'fix-dump-log-errmsg'
[i3/i3] / src / workspace.c
index 4fc8ba1bda3c421905c7a3b1720cd1cc7e506879..44f32c2dfa4aecdad30dc0f40318925e0367ba77 100644 (file)
@@ -52,8 +52,8 @@ Con *workspace_get(const char *num, bool *created) {
         workspace->type = CT_WORKSPACE;
         FREE(workspace->name);
         workspace->name = sstrdup(num);
-        /* We set ->num to the number if this workspace’s name consists only of
-         * positive number. Otherwise it’s a named ws and num will be -1. */
+        /* We set ->num to the number if this workspace’s name begins with a
+         * positive number. Otherwise it’s a named ws and num will be -1. */
         char *endptr = NULL;
         long parsed_num = strtol(num, &endptr, 10);
         if (parsed_num == LONG_MIN ||
@@ -393,7 +393,7 @@ void workspace_show_by_name(const char *num) {
  * Focuses the next workspace.
  *
  */
-Con* workspace_next() {
+Con* workspace_next(void) {
     Con *current = con_get_workspace(focused);
     Con *next = NULL;
     Con *output;
@@ -463,7 +463,7 @@ workspace_next_end:
  * Focuses the previous workspace.
  *
  */
-Con* workspace_prev() {
+Con* workspace_prev(void) {
     Con *current = con_get_workspace(focused);
     Con *prev = NULL;
     Con *output;
@@ -535,7 +535,7 @@ workspace_prev_end:
  * Focuses the next workspace on the same output.
  *
  */
-Con* workspace_next_on_output() {
+Con* workspace_next_on_output(void) {
     Con *current = con_get_workspace(focused);
     Con *next = NULL;
     Con *output  = con_get_output(focused);
@@ -590,10 +590,11 @@ workspace_next_on_output_end:
  * Focuses the previous workspace on same output.
  *
  */
-Con* workspace_prev_on_output() {
+Con* workspace_prev_on_output(void) {
     Con *current = con_get_workspace(focused);
     Con *prev = NULL;
     Con *output  = con_get_output(focused);
+    DLOG("output = %s\n", output->name);
 
     if (current->num == -1) {
         /* If named workspace, find previous named workspace. */
@@ -646,7 +647,7 @@ workspace_prev_on_output_end:
  * Focuses the previously focused workspace.
  *
  */
-void workspace_back_and_forth() {
+void workspace_back_and_forth(void) {
     if (!previous_workspace_name) {
         DLOG("No previous workspace name set. Not switching.");
         return;