necouchman commented on code in PR #594:
URL: https://github.com/apache/guacamole-server/pull/594#discussion_r2114687188
##########
src/protocols/rdp/gdi.c:
##########
@@ -159,7 +159,17 @@ BOOL guac_rdp_gdi_desktop_resize(rdpContext* context) {
int width = guac_rdp_get_width(context->instance);
int height = guac_rdp_get_height(context->instance);
- GUAC_ASSERT(rdp_client->current_context == NULL);
+ int major;
+ int minor;
+ int revision;
+ freerdp_get_version(&major, &minor, &revision);
+
+ /* For FreeRDP versions prior to 3.8.0, EndPaint will not be called in
+ * `gdi_resize()`, so the current context should be NULL. If it is not
+ * NULL, it means that the current context is still open, and therefore the
+ * GDI buffer has not been flushed yet. */
+ if (major < 3 || (major == 3 && minor < 8))
+ GUAC_ASSERT(rdp_client->current_context == NULL);
Review Comment:
Wouldn't it be a bit more efficient to deal with this during build-time,
defining something in configure that checks for this and then use
`#ifdef...#endif`, here? It may not make all that much difference,
performance-wise, but just seems like the likelihood of FreeRDP changing from
something pre-3.8 to 3.8 or later without a Guacamole rebuild is pretty slim?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]