gimp but for windows: a wayland compositor
git clone https://github.com/m-col/wimp
Files | Refs | Readme

Commit b885455b2bf3142bbcece998ed581abd00d92e2a
Parent: 77f6e7ef3bd908d4bfa22eb9bbe68fcde6e5fe12
Author: mcol <mcol@posteo.net>
Date: 2021-03-06 19:32:07 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-03-06 19:32:07 +0000

expose next_desk, prev_desk to client interface

src/action.c Modified

@@ -15,22 +15,19 @@
 
 bool do_action(char *message, char *response) {
     char *s;
-    bool handled = false;
+    bool handled = true;
 
     if (!strcasecmp(message, "terminate")) {
-	handled = true;
 	terminate(NULL);
     }
 
     else if (!strcasecmp(message, "exec")) {
-	handled = true;
 	if ((s = strtok(NULL, "\n\r"))) {
 	    exec_command(s);
 	}
     }
 
     else if (!strcasecmp(message, "change_vt")) {
-	handled = true;
 	if ((s = strtok(NULL, " \t\n\r"))) {
 	    int vt = strtod(s, NULL);
 	    if (vt && 0 < vt && vt <= 12) {
@@ -42,12 +39,10 @@
     }
 
     else if (!strcasecmp(message, "close_window")) {
-	handled = true;
 	close_window(NULL);
     }
 
     else if (!strcasecmp(message, "move_window")) {
-	handled = true;
 	char *x, *y;
 	if (
 	    (x = strtok(NULL, " \t\n\r")) && (y = strtok(NULL, " \t\n\r"))
@@ -76,7 +71,6 @@
     }
 
     else if (!strcasecmp(message, "focus_in_direction")) {
-	handled = true;
 	if ((s = strtok(NULL, " \t\n\r"))) {
 	    struct wlr_box box;
 	    if (wlr_box_from_str(s, &box)) {
@@ -85,8 +79,15 @@
 	}
     }
 
+    else if (!strcasecmp(message, "next_desk")) {
+	next_desk(NULL);
+    }
+
+    else if (!strcasecmp(message, "prev_desk")) {
+	prev_desk(NULL);
+    }
+
     else if (!strcasecmp(message, "to_region")) {
-	handled = true;
 	if ((s = strtok(NULL, " \t\n\r"))) {
 	    struct wlr_box box;
 	    if (wlr_box_from_str(s, &box)) {
@@ -95,6 +96,10 @@
 	}
     }
 
+    else {
+	handled = false;
+    }
+
     return handled;
 }