From 8b7bdb9550f69640e9ef267a4af544d7b5a71ee0 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 e92426ae9..212d93461 100644 --- a/src/libguac/display-plan.c +++ b/src/libguac/display-plan.c @@ -412,12 +412,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;