mirror of https://github.com/yshui/picom.git
win: store if transparent-clipping is enabled for window
Instead of storing if transparent-clipping is excluded for the window, so later we don't need access `struct options::transparent_clipping` to determine if transparent-clipping is enabled for a window. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
f10903d4c3
commit
90e507d739
|
@ -1040,7 +1040,7 @@ static bool paint_preprocess(session_t *ps, bool *fade_running, bool *animation,
|
|||
// we add the window region to the ignored region
|
||||
// Otherwise last_reg_ignore shouldn't change
|
||||
if ((w->mode != WMODE_TRANS && !ps->o.force_win_blend) ||
|
||||
(ps->o.transparent_clipping && !w->transparent_clipping_excluded)) {
|
||||
w->transparent_clipping) {
|
||||
// w->mode == WMODE_SOLID or WMODE_FRAME_TRANS
|
||||
region_t *tmp = rc_region_new();
|
||||
if (w->mode == WMODE_SOLID) {
|
||||
|
|
|
@ -1385,8 +1385,9 @@ void win_on_factor_change(session_t *ps, struct managed_win *w) {
|
|||
|
||||
w->fade_excluded = c2_match(ps->c2_state, w, ps->o.fade_blacklist, NULL);
|
||||
|
||||
w->transparent_clipping_excluded =
|
||||
c2_match(ps->c2_state, w, ps->o.transparent_clipping_blacklist, NULL);
|
||||
w->transparent_clipping =
|
||||
ps->o.transparent_clipping &&
|
||||
!c2_match(ps->c2_state, w, ps->o.transparent_clipping_blacklist, NULL);
|
||||
|
||||
win_update_opacity_target(ps, w);
|
||||
|
||||
|
@ -1666,7 +1667,7 @@ struct win *attr_ret_nonnull maybe_allocate_managed_win(session_t *ps, struct wi
|
|||
.rounded_corners = false,
|
||||
.paint_excluded = false,
|
||||
.fade_excluded = false,
|
||||
.transparent_clipping_excluded = false,
|
||||
.transparent_clipping = false,
|
||||
.unredir_if_possible_excluded = false,
|
||||
.prop_shadow = -1,
|
||||
// following 4 are set in win_mark_client
|
||||
|
|
Loading…
Reference in New Issue