summaryrefslogtreecommitdiff
path: root/vcl/inc/unx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/inc/unx')
-rw-r--r--vcl/inc/unx/gtk/gtkdata.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 6203d10d4530..cf1454b6f589 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -133,6 +133,18 @@ inline void widget_set_cursor(GtkWidget *pWidget, GdkCursor *pCursor)
#endif
}
+inline cairo_surface_t * surface_create_similar_surface(GdkSurface *pSurface,
+ cairo_content_t eContent,
+ int nWidth,
+ int nHeight)
+{
+#if GTK_CHECK_VERSION(4, 0, 0)
+ return gdk_surface_create_similar_surface(pSurface, eContent, nWidth, nHeight);
+#else
+ return gdk_window_create_similar_surface(pSurface, eContent, nWidth, nHeight);
+#endif
+}
+
#if GTK_CHECK_VERSION(4, 0, 0)
typedef double gtk_coord;
#else