Make the dummykeyfunc and legacyfunc look a little less like c++
Remove hiding windows when chaning xrandr on the fly since stack deals
with it and it ws causing issues with making windows dissapear.
struct swm_region *rr;
int i;
struct swm_region *rr;
int i;
+ /* do nothing if we don't have more than one screen */
+ if (!(ScreenCount(display) > 1 || outputs > 1))
+ return;
+
i = r->s->idx;
switch (args->id) {
case SWM_ARG_ID_CYCLESC_UP:
i = r->s->idx;
switch (args->id) {
case SWM_ARG_ID_CYCLESC_UP:
-void dummykeyfunc(struct swm_region *r, union arg *args) {};
-void legacyfunc(struct swm_region *r, union arg *args) {};
+void
+dummykeyfunc(struct swm_region *r, union arg *args)
+{
+};
+
+void
+legacyfunc(struct swm_region *r, union arg *args)
+{
+};
struct keyfunc {
char name[SWM_FUNCNAME_LEN];
struct keyfunc {
char name[SWM_FUNCNAME_LEN];
/* brute force for now, just re-enumerate the regions */
scan_xrandr(i);
/* brute force for now, just re-enumerate the regions */
scan_xrandr(i);
- /* hide any windows that went away */
- TAILQ_FOREACH(r, &screens[i].rl, entry)
- TAILQ_FOREACH(win, &r->ws->winlist, entry)
- unmap_window(win);
-
/* add bars to all regions */
for (i = 0; i < ScreenCount(display); i++)
TAILQ_FOREACH(r, &screens[i].rl, entry)
/* add bars to all regions */
for (i = 0; i < ScreenCount(display); i++)
TAILQ_FOREACH(r, &screens[i].rl, entry)