]> git.lizzy.rs Git - bspwm.git/commitdiff
Discard colons within refs in `desktop_from_desc`
authorBastien Dejean <nihilhill@gmail.com>
Sat, 17 Apr 2021 19:16:20 +0000 (21:16 +0200)
committerBastien Dejean <nihilhill@gmail.com>
Sat, 17 Apr 2021 19:16:20 +0000 (21:16 +0200)
Fixes #1278.
Closes #1282.

src/query.c

index b11662adad394d06486ead9a4f6ba0133dec81ab..c3faa0a0ccc1b18a1675b7aa95c3a00e1c92bddf 100644 (file)
@@ -717,6 +717,11 @@ int desktop_from_desc(char *desc, coordinates_t *ref, coordinates_t *dst)
                }
        }
 
+       /* Discard colons within references, e.g. `DisplayPort-1:focused#next.local` */
+       if (colon != NULL && hash != NULL && colon < hash) {
+               colon = NULL;
+       }
+
        desktop_select_t sel = make_desktop_select();
 
        if (!parse_desktop_modifiers(colon != NULL ? colon : desc, &sel)) {