[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara caolanm at redhat.com
Tue May 24 11:33:16 UTC 2016


 vcl/unx/gtk3/gtk3gtkdata.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 7528fd4491f271f4b0faf1ca5d858bb9fac124ec
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 24 12:30:55 2016 +0100

    support old gtk3s
    
    Change-Id: I20429aa8c06a319f9eb11079b320211f38e16827

diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
index 3aae62b..ca210e0 100644
--- a/vcl/unx/gtk3/gtk3gtkdata.cxx
+++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
@@ -200,7 +200,13 @@ GdkCursor* GtkSalDisplay::getFromXBM( const unsigned char *pBitmap,
     cairo_mask_surface(cr, mask, 0, 0);
     cairo_destroy(cr);
 
+#if GTK_CHECK_VERSION(3,10,0)
     GdkCursor *cursor = gdk_cursor_new_from_surface(m_pGdkDisplay, s, nXHot, nYHot);
+#else
+    GdkPixbuf *pixbuf = gdk_pixbuf_get_from_surface(s, 0, 0, nWidth, nHeight);
+    GdkCursor *cursor = gdk_cursor_new_from_pixbuf(m_pGdkDisplay, pixbuf, nXHot, nYHot);
+    g_object_unref(pixbuf);
+#endif
 
     cairo_surface_destroy(s);
     cairo_surface_destroy(mask);


More information about the Libreoffice-commits mailing list