#include "wincontrol.h"
#include <stdlib.h> /* for free() */
-#include <string.h> /* for strlen() */
+#include <string.h> /* for strlen(), strchr(), strstr() */
#include <stdint.h> /* for uint8_t, uint16_t */
#include <stdio.h> /* for fwrite() */
#include <unistd.h> /* for access(), unlink() */
uint8_t i = 0;
for (; i < linemax - 1; i++)
{
+ if (NULL == strchr(world->winconf_ids, win_order[i]))
+ {
+ continue;
+ }
toggle_window(world->wmeta, get_win_by_id(world, win_order[i]));
}
}
/* Toggle windows in world->wins in the order desribed by the first line of
- * config/windows/toggled_win_order, wherein each character may correspond to
- * one hardcoded window.
+ * config/windows/toggled_win_order, wherein each character should correspond to
+ * one window the ID of which is found in world->winconf_ids. Unknown characters
+ * are silently ignored.
*/
extern void sorted_wintoggle(struct World * world);