From: Reginald Kennedy Date: Fri, 10 Oct 2014 07:04:12 +0000 (+0800) Subject: Fix MINIMALBORDER on region focus cycling. X-Git-Tag: SPECTRWM_2_7_0~11 X-Git-Url: https://code.delx.au/spectrwm/commitdiff_plain/978e4b1b00bfa61a9bafcbe9b60fa339773ddcea Fix MINIMALBORDER on region focus cycling. Fix quirk ordering in man page. --- diff --git a/spectrwm.1 b/spectrwm.1 index f03b59e..97b0b70 100644 --- a/spectrwm.1 +++ b/spectrwm.1 @@ -1047,11 +1047,11 @@ Remove border to allow window to use full region size. .It FOCUSPREV On exit force focus on previously focused application not previous application in the stack. +.It MINIMALBORDER +Remove border when window is unfocused and floating. .It NOFOCUSCYCLE Remove from normal focus cycle (focus_prev or focus_next). The window can still be focused using search_win. -.It MINIMALBORDER -Remove border when window is unfocused and floating. .It NOFOCUSONMAP Don't change focus to the window when it first appears on the screen. Has no effect when diff --git a/spectrwm.c b/spectrwm.c index b84694b..0e29167 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -3655,6 +3655,16 @@ focus_win(struct ws_win *win) &cfw->s->c[(MAXIMIZED(cfw) ? SWM_S_COLOR_UNFOCUS_MAXIMIZED : SWM_S_COLOR_UNFOCUS)].pixel); + + /* Update border width */ + if (cfw->bordered && + (cfw->quirks & SWM_Q_MINIMALBORDER) && + FLOATING(cfw)) { + cfw->bordered = 0; + X(cfw) += border_width; + Y(cfw) += border_width; + update_window(cfw); + } } else { unfocus_win(cfw); }