diff options
Diffstat (limited to 'plugins/rdp')
-rw-r--r-- | plugins/rdp/rdp_event.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/rdp/rdp_event.c b/plugins/rdp/rdp_event.c index edbf335f7..71d444cb6 100644 --- a/plugins/rdp/rdp_event.c +++ b/plugins/rdp/rdp_event.c @@ -364,7 +364,9 @@ static gboolean remmina_rdp_event_on_draw(GtkWidget *widget, cairo_t *context, R if (rfi->scale == REMMINA_PROTOCOL_WIDGET_SCALE_MODE_SCALED) cairo_scale(context, rfi->scale_x, rfi->scale_y); + cairo_surface_flush(rfi->surface); cairo_set_source_surface(context, rfi->surface, 0, 0); + cairo_surface_mark_dirty(rfi->surface); cairo_set_operator(context, CAIRO_OPERATOR_SOURCE); // Ignore alpha channel from FreeRDP cairo_paint(context); @@ -1008,6 +1010,7 @@ void remmina_rdp_event_uninit(RemminaProtocolWidget *gp) while ((ui = (RemminaPluginRdpUiObject *)g_async_queue_try_pop(rfi->ui_queue)) != NULL) remmina_rdp_event_free_event(gp, ui); if (rfi->surface) { + cairo_surface_mark_dirty(rfi->surface); cairo_surface_destroy(rfi->surface); rfi->surface = NULL; } @@ -1048,11 +1051,13 @@ static void remmina_rdp_event_create_cairo_surface(rfContext *rfi) return; if (rfi->surface) { + cairo_surface_mark_dirty(rfi->surface); cairo_surface_destroy(rfi->surface); rfi->surface = NULL; } stride = cairo_format_stride_for_width(rfi->cairo_format, gdi->width); rfi->surface = cairo_image_surface_create_for_data((unsigned char *)gdi->primary_buffer, rfi->cairo_format, gdi->width, gdi->height, stride); + cairo_surface_flush(rfi->surface); } void remmina_rdp_event_update_scale(RemminaProtocolWidget *gp) @@ -1075,6 +1080,7 @@ void remmina_rdp_event_update_scale(RemminaProtocolWidget *gp) if (rfi->surface && (cairo_image_surface_get_width(rfi->surface) != gdi->width || cairo_image_surface_get_height(rfi->surface) != gdi->height)) { /* Destroys and recreate rfi->surface with new width and height */ + cairo_surface_mark_dirty(rfi->surface); cairo_surface_destroy(rfi->surface); rfi->surface = NULL; remmina_rdp_event_create_cairo_surface(rfi); @@ -1149,7 +1155,9 @@ static BOOL remmina_rdp_event_create_cursor(RemminaProtocolWidget *gp, RemminaPl } surface = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32, pointer->width, pointer->height, cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, pointer->width)); + cairo_surface_flush(surface); pixbuf = gdk_pixbuf_get_from_surface(surface, 0, 0, pointer->width, pointer->height); + cairo_surface_mark_dirty(surface); cairo_surface_destroy(surface); free(data); ((rfPointer *)ui->cursor.pointer)->cursor = gdk_cursor_new_from_pixbuf(rfi->display, pixbuf, pointer->xPos, pointer->yPos); @@ -1261,6 +1269,7 @@ static void remmina_rdp_ui_event_destroy_cairo_surface(RemminaProtocolWidget *gp TRACE_CALL(__func__); rfContext *rfi = GET_PLUGIN_DATA(gp); + cairo_surface_mark_dirty(rfi->surface); cairo_surface_destroy(rfi->surface); rfi->surface = NULL; } |