mirror of
https://github.com/yshui/picom.git
synced 2025-02-17 15:56:21 -05:00
renderer: fix force_win_blend having no effect on window body
Fixes #1354 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
dadfe5a70e
commit
8370ebf00d
2 changed files with 6 additions and 4 deletions
|
@ -3,6 +3,7 @@
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
|
||||||
* Fix memory corruption that can happen when handling window property changes (#1350)
|
* Fix memory corruption that can happen when handling window property changes (#1350)
|
||||||
|
* Fix `force-win-blend` having no effect (#1354)
|
||||||
|
|
||||||
# 12.2 (2024-Oct-10)
|
# 12.2 (2024-Oct-10)
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
/// @return number of commands generated
|
/// @return number of commands generated
|
||||||
static inline unsigned
|
static inline unsigned
|
||||||
commands_for_window_body(struct layer *layer, struct backend_command *cmd_base,
|
commands_for_window_body(struct layer *layer, struct backend_command *cmd_base,
|
||||||
const region_t *frame_region, bool inactive_dim_fixed,
|
const region_t *frame_region, bool inactive_dim_fixed, bool force_blend,
|
||||||
double max_brightness, const struct shader_info *shaders) {
|
double max_brightness, const struct shader_info *shaders) {
|
||||||
auto w = layer->win;
|
auto w = layer->win;
|
||||||
auto cmd = cmd_base;
|
auto cmd = cmd_base;
|
||||||
|
@ -39,7 +39,8 @@ commands_for_window_body(struct layer *layer, struct backend_command *cmd_base,
|
||||||
pixman_region32_subtract(&cmd->target_mask, &cmd->target_mask, frame_region);
|
pixman_region32_subtract(&cmd->target_mask, &cmd->target_mask, frame_region);
|
||||||
}
|
}
|
||||||
pixman_region32_init(&cmd->opaque_region);
|
pixman_region32_init(&cmd->opaque_region);
|
||||||
if ((mode == WMODE_SOLID || mode == WMODE_FRAME_TRANS) && layer->opacity == 1.0) {
|
if ((mode == WMODE_SOLID || mode == WMODE_FRAME_TRANS) && layer->opacity == 1.0 &&
|
||||||
|
!force_blend) {
|
||||||
pixman_region32_copy(&cmd->opaque_region, &cmd->target_mask);
|
pixman_region32_copy(&cmd->opaque_region, &cmd->target_mask);
|
||||||
if (mode == WMODE_FRAME_TRANS) {
|
if (mode == WMODE_FRAME_TRANS) {
|
||||||
pixman_region32_subtract(&cmd->opaque_region, &cmd->opaque_region,
|
pixman_region32_subtract(&cmd->opaque_region, &cmd->opaque_region,
|
||||||
|
@ -450,8 +451,8 @@ void command_builder_build(struct command_builder *cb, struct layout *layout,
|
||||||
layer->window.origin.y);
|
layer->window.origin.y);
|
||||||
|
|
||||||
// Add window body
|
// Add window body
|
||||||
cmd -= commands_for_window_body(
|
cmd -= commands_for_window_body(layer, cmd, &frame_region, inactive_dim_fixed,
|
||||||
layer, cmd, &frame_region, inactive_dim_fixed, max_brightness, shaders);
|
force_blend, max_brightness, shaders);
|
||||||
|
|
||||||
// Add shadow
|
// Add shadow
|
||||||
cmd -= command_for_shadow(layer, cmd, monitors, last + 1);
|
cmd -= command_for_shadow(layer, cmd, monitors, last + 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue