Skip to content

Commit

Permalink
GUACAMOLE-1997: Merge fix for upstream change in EndPaint behavior (F…
Browse files Browse the repository at this point in the history
…reeRDP 3.8.0+).

As of FreeRDP 3.8.0, EndPaint may be invoked on its own without first invoking BeginPaint.
  • Loading branch information
mike-jumper authored Nov 9, 2024
2 parents be51ad1 + 11ea330 commit 691bd6f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/protocols/rdp/gdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,14 @@ BOOL guac_rdp_gdi_end_paint(rdpContext* context) {

guac_display_layer* default_layer = guac_display_default_layer(rdp_client->display);
guac_display_layer_raw_context* current_context = rdp_client->current_context;
GUAC_ASSERT(current_context != NULL);

/* Handle the case where EndPaint was called without a preceding BeginPaint.
* This can occur during screen resize events in "display-update" mode with
* FreeRDP version 3.8.0 or later, where EndPaint is called to ensure the
* update-lock is released and data is flushed before resizing. See the
* associated FreeRDP PR: https://github.com/FreeRDP/FreeRDP/pull/10488 */
if (current_context == NULL)
return TRUE;

/* Ignore paint if GDI output is suppressed */
if (gdi->suppressOutput)
Expand Down

0 comments on commit 691bd6f

Please sign in to comment.