desc = desc_copy;
char *hash = strrchr(desc, '#');
+ char *colon = strrchr(desc, ':');
+
+ /* Discard hashes inside a MONITOR_SEL, e.g. `primary#next:focused` */
+ if (hash != NULL && colon != NULL && hash < colon) {
+ hash = NULL;
+ }
if (hash != NULL) {
*hash = '\0';
}
desktop_select_t sel = make_desktop_select();
- char *colon = strrchr(desc, ':');
if (!parse_desktop_modifiers(colon != NULL ? colon : desc, &sel)) {
free(desc_copy);