From e051dc33d4ab56596394d12633185d98ad12a8db Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 26 Sep 2024 02:25:02 -0700 Subject: [PATCH] GUACAMOLE-377: Ignore alpha for rectangle operations on opaque layers. --- src/libguac/display-plan.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libguac/display-plan.c b/src/libguac/display-plan.c index dfb63560f..243642b1e 100644 --- a/src/libguac/display-plan.c +++ b/src/libguac/display-plan.c @@ -403,12 +403,12 @@ void guac_display_plan_apply(guac_display_plan* plan) { /* Clear before drawing if layer is not opaque (transparency * will not be copied correctly otherwise) */ - if (!display_layer->opaque) - guac_protocol_send_cfill(client->socket, GUAC_COMP_ROUT, display_layer->layer, - 0x00, 0x00, 0x00, 0xFF); - - guac_protocol_send_cfill(client->socket, GUAC_COMP_OVER, display_layer->layer, - red, green, blue, alpha); + if (!display_layer->opaque) { + guac_protocol_send_cfill(client->socket, GUAC_COMP_ROUT, display_layer->layer, 0x00, 0x00, 0x00, 0xFF); + guac_protocol_send_cfill(client->socket, GUAC_COMP_OVER, display_layer->layer, red, green, blue, alpha); + } + else + guac_protocol_send_cfill(client->socket, GUAC_COMP_OVER, display_layer->layer, red, green, blue, 0xFF); break;