return;
if (!cairo_popup_image_ensure(wp))
return;
+ cairo_surface_t *surface = (cairo_surface_t *)wp->w_popup_image_surface;
+
+# if !GTK_CHECK_VERSION(3,0,0)
+ cr = gdk_cairo_create((GdkDrawable *)target);
+# else
cr = cairo_create((cairo_surface_t *)target);
+# endif
cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
// Position the source so its (src_x, src_y) pixel lands at (x, y),
// then clip to the visible (draw_w x draw_h) rectangle.
cairo_set_source_surface(cr,
- (cairo_surface_t *)wp->w_popup_image_surface,
+ surface,
x - src_x, y - src_y);
+
cairo_rectangle(cr, x, y, draw_w, draw_h);
cairo_fill(cr);
cairo_destroy(cr);
if (!gui.in_focus)
{
gui_mch_draw_hollow_cursor(cbg);
+#if defined(FEAT_GUI_GTK) && defined(FEAT_IMAGE_CAIRO)
+# if !GTK_CHECK_VERSION(4,0,0)
+ update_popup_images();
+# endif
+#endif
return;
}
#endif
}
gui.highlight_mask = old_hl_mask;
+#if defined(FEAT_GUI_GTK) && defined(FEAT_IMAGE_CAIRO)
+# if !GTK_CHECK_VERSION(4,0,0)
+ update_popup_images();
+# endif
+#endif
}
#if defined(FEAT_MENU)
if (wp->w_popup_image_data == NULL
|| wp->w_popup_image_w <= 0 || wp->w_popup_image_h <= 0
|| draw_w <= 0 || draw_h <= 0
- || gui.surface == NULL)
+# if GTK_CHECK_VERSION(3,0,0)
+ || gui.surface == NULL
+# endif
+ )
return;
x = FILL_X(col);
y = FILL_Y(row);
+# if GTK_CHECK_VERSION(3,0,0)
cairo_popup_image_paint(wp, gui.surface, x, y,
- src_x, src_y, draw_w, draw_h);
-
+ src_x, src_y, draw_w, draw_h);
if (gui.drawarea != NULL)
gtk_widget_queue_draw_area(gui.drawarea, x, y, draw_w, draw_h);
+# else
+ cairo_popup_image_paint(wp, gui.drawarea->window, x, y,
+ src_x, src_y, draw_w, draw_h);
+# endif
}
#endif // FEAT_IMAGE_CAIRO
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 692,
/**/
691,
/**/