new backend: ignore window tranparency info from the backend

Doing this forces compton to blur every windows' background.

However, doing this can be beneficial, we will figure out a way
to do this properly in the future.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-07-13 12:44:41 +01:00
parent 426043baa7
commit 372f4f816e
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 4 additions and 9 deletions

View File

@ -162,16 +162,11 @@ void paint_all_new(session_t *ps, struct managed_win *t, bool ignore_damage) {
pixman_region32_intersect(&reg_paint, &reg_bound, &reg_damage); pixman_region32_intersect(&reg_paint, &reg_bound, &reg_damage);
// Blur window background // Blur window background
bool win_transparent = ps->backend_data->ops->is_image_transparent( // TODO since the background might change the content of the window (e.g.
ps->backend_data, w->win_image); // with shaders), we should consult the background whether the window
// is transparent or not. for now we will just rely on the
// force_win_blend option
auto real_win_mode = w->mode; auto real_win_mode = w->mode;
if (win_transparent && real_win_mode == WMODE_SOLID) {
// Compton core thought the window is opaque, but background thinks
// the window is transparent. Since the core doesn't have extra
// information to determine which part of the window is
// transparent, just assume the whole window is.
real_win_mode = WMODE_TRANS;
}
if (w->blur_background && if (w->blur_background &&
(ps->o.force_win_blend || real_win_mode == WMODE_TRANS || (ps->o.force_win_blend || real_win_mode == WMODE_TRANS ||