]> git.lizzy.rs Git - bspwm.git/commitdiff
Reset some of the reference fields in query -{M,D}
authorBastien Dejean <nihilhill@gmail.com>
Sun, 26 Jul 2020 17:28:43 +0000 (19:28 +0200)
committerBastien Dejean <nihilhill@gmail.com>
Sun, 26 Jul 2020 17:28:43 +0000 (19:28 +0200)
Fixes #1111.

src/messages.c

index 7c34c0fe559be64d74bcbefe73a2fd2c089524cf..0d3978cd1b014e881a7aa27920a7ba68800fe42a 100644 (file)
@@ -965,6 +965,8 @@ void cmd_query(char **args, int num, FILE *rsp)
                                num--, args++;
                                int ret;
                                coordinates_t tmp = ref;
+                               ref.desktop = NULL;
+                               ref.node = NULL;
                                if ((ret = monitor_from_desc(*args, &tmp, &ref)) != SELECTOR_OK) {
                                        handle_failure(ret, "query -M", *args, rsp);
                                        goto end;
@@ -976,6 +978,7 @@ void cmd_query(char **args, int num, FILE *rsp)
                                num--, args++;
                                int ret;
                                coordinates_t tmp = ref;
+                               ref.node = NULL;
                                if ((ret = desktop_from_desc(*args, &tmp, &ref)) != SELECTOR_OK) {
                                        handle_failure(ret, "query -D", *args, rsp);
                                        goto end;