Add rounded-corners-exclude configuration option
Allows the user to selectively disable rounded corners. Authored-by: Samuel Hand <samuel.d.hand@gmail.com>
This commit is contained in:
21
src/win.c
21
src/win.c
@@ -1033,6 +1033,26 @@ static void win_determine_blur_background(session_t *ps, struct managed_win *w)
|
||||
win_set_blur_background(ps, w, blur_background_new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a window should have rounded corners.
|
||||
*/
|
||||
static void win_determine_rounded_corners(session_t *ps, struct managed_win *w) {
|
||||
if (ps->o.corner_radius == 0) {
|
||||
w->corner_radius = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't round full screen windows & excluded windows
|
||||
if ((w && win_is_fullscreen(ps, w)) ||
|
||||
c2_match(ps, w, ps->o.rounded_corners_blacklist, NULL)) {
|
||||
w->corner_radius = 0;
|
||||
log_debug("Not rounding corners for window %#010x", w->base.id);
|
||||
} else {
|
||||
w->corner_radius = ps->o.corner_radius;
|
||||
log_debug("Rounding corners for window %#010x", w->base.id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update window opacity according to opacity rules.
|
||||
*/
|
||||
@@ -1067,6 +1087,7 @@ void win_on_factor_change(session_t *ps, struct managed_win *w) {
|
||||
win_determine_shadow(ps, w);
|
||||
win_determine_invert_color(ps, w);
|
||||
win_determine_blur_background(ps, w);
|
||||
win_determine_rounded_corners(ps, w);
|
||||
w->mode = win_calc_mode(w);
|
||||
log_debug("Window mode changed to %d", w->mode);
|
||||
win_update_opacity_rule(ps, w);
|
||||
|
||||
Reference in New Issue
Block a user