backend: allow transparent windows to clip other windows
Transparent windows usually blends on top of other windows, this commit adds an option to make transparent windows clip other windows like non-transparent windows do. Closes #265 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -549,10 +549,11 @@ static struct managed_win *paint_preprocess(session_t *ps, bool *fade_running) {
|
||||
w->reg_ignore = rc_region_ref(last_reg_ignore);
|
||||
}
|
||||
|
||||
// If the window is solid, we add the window region to the
|
||||
// ignored region
|
||||
// If the window is solid, or we enabled clipping for transparent windows,
|
||||
// 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) {
|
||||
if ((w->mode != WMODE_TRANS && !ps->o.force_win_blend) ||
|
||||
ps->o.transparent_clipping) {
|
||||
// w->mode == WMODE_SOLID or WMODE_FRAME_TRANS
|
||||
region_t *tmp = rc_region_new();
|
||||
if (w->mode == WMODE_SOLID) {
|
||||
|
Reference in New Issue
Block a user