X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=scrotwm.c;h=634e08b27d142c7589a71681197c5831cab6a4b2;hb=0266c3c6c39b5f188424ee41d6df07a53b53a7da;hp=ef373bb54d8c33a3c188f41e45c2760fb2f29b22;hpb=9a45e3891c530300821b69bd9ea4ad87e83e9a81;p=spectrwm.git diff --git a/scrotwm.c b/scrotwm.c index ef373bb..634e08b 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -160,7 +160,7 @@ int font_adjusted = 0; /* dialog windows */ double dialog_ratio = .6; /* status bar */ -#define SWM_BAR_MAX (128) +#define SWM_BAR_MAX (256) char *bar_argv[] = { NULL, NULL }; int bar_pipe[2]; char bar_ext[SWM_BAR_MAX]; @@ -249,6 +249,7 @@ void horizontal_stack(struct workspace *, struct swm_geometry *); void max_stack(struct workspace *, struct swm_geometry *); void grabbuttons(struct ws_win *, int); +void new_region(struct swm_screen *, int, int, int, int); struct layout { void (*l_stack)(struct workspace *, struct swm_geometry *); @@ -437,8 +438,6 @@ setscreencolor(char *val, int i, int c) i, ScreenCount(display)); } -void new_region(struct swm_screen *, int, int, int, int); - void custom_region(char *val) { @@ -1289,6 +1288,10 @@ focus(struct swm_region *r, union arg *args) case SWM_ARG_ID_FOCUSMAIN: winfocus = TAILQ_FIRST(wl); + if (winfocus == cur_focus) + winfocus = cur_focus->ws->focus_prev; + if (winfocus == NULL) + return; break; default: @@ -2790,6 +2793,11 @@ screenchange(XEvent *e) { TAILQ_FOREACH(r, &screens[i].rl, entry) TAILQ_FOREACH(win, &r->ws->winlist, entry) XUnmapWindow(display, win->id); + + /* add bars to all regions */ + for (i = 0; i < ScreenCount(display); i++) + TAILQ_FOREACH(r, &screens[i].rl, entry) + bar_setup(r); stack(); }