X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=scrotwm.c;h=a0d33b799640f141224c7eab340b21165d755a24;hb=e218053b3044cbc21b8c2485e0a1584ef344881f;hp=b7f37fdb981ab11bbd51e7cd3b863401712d9522;hpb=87894d058c4ea94dcbf38c6fdabf028f65edcf10;p=spectrwm.git diff --git a/scrotwm.c b/scrotwm.c index b7f37fd..a0d33b7 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -52,7 +52,7 @@ static const char *cvstag = "$scrotwm$"; -#define SWM_VERSION "0.9.26" +#define SWM_VERSION "0.9.27" #include #include @@ -1040,10 +1040,12 @@ custom_region(char *val) if (x < 0 || x > DisplayWidth(display, sidx) || y < 0 || y > DisplayHeight(display, sidx) || w + x > DisplayWidth(display, sidx) || - h + y > DisplayHeight(display, sidx)) - errx(1, "region %ux%u+%u+%u not within screen boundaries " + h + y > DisplayHeight(display, sidx)) { + fprintf(stderr, "ignoring region %ux%u+%u+%u - not within screen boundaries " "(%ux%u)\n", w, h, x, y, DisplayWidth(display, sidx), DisplayHeight(display, sidx)); + return; + } new_region(&screens[sidx], x, y, w, h); } @@ -2832,6 +2834,9 @@ floating_toggle(struct swm_region *r, union arg *args) struct ws_win *win = r->ws->focus; union arg a; + if (win == NULL) + return; + ewmh_update_win_state(win, ewmh[_NET_WM_STATE_ABOVE].atom, _NET_WM_STATE_TOGGLE); @@ -4439,7 +4444,9 @@ unmanage_window(struct ws_win *win) parent->child_trans = NULL; } - /* work around for mplayer going full screen */ + /* focus on root just in case */ + XSetInputFocus(display, PointerRoot, PointerRoot, CurrentTime); + if (!win->floating) focus_prev(win);