From: Bastien Dejean Date: Sat, 17 Apr 2021 19:16:20 +0000 (+0200) Subject: Discard colons within refs in `desktop_from_desc` X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=4b6f3761b0094fd911de84b1b0ccd2f3721b7a19;p=bspwm.git Discard colons within refs in `desktop_from_desc` Fixes #1278. Closes #1282. --- diff --git a/src/query.c b/src/query.c index b11662a..c3faa0a 100644 --- a/src/query.c +++ b/src/query.c @@ -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)) {