[goffice] Canvas: handle missing GDK_SMOOTH_SCROLL_MASK.



commit a7df623854682c062f36fdf7f9841dd6937f2aba
Author: Morten Welinder <terra gnome org>
Date:   Fri May 18 11:37:39 2012 -0400

    Canvas: handle missing GDK_SMOOTH_SCROLL_MASK.

 configure.in                |    1 +
 goffice/canvas/goc-canvas.c |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/configure.in b/configure.in
index 0d27b63..03f8bae 100644
--- a/configure.in
+++ b/configure.in
@@ -535,6 +535,7 @@ SAVE_LIBS=$LIBS
 CFLAGS="$CFLAGS $GOFFICE_CFLAGS"
 LIBS="$GOFFICE_LIBS $LIBS"
 AC_CHECK_FUNCS(gsf_odf_out_get_version)
+AC_CHECK_FUNCS(gdk_event_get_scroll_deltas)
 CFLAGS=$SAVE_CFLAGS
 LIBS=$SAVE_LIBS
 
diff --git a/goffice/canvas/goc-canvas.c b/goffice/canvas/goc-canvas.c
index b8e6211..5dd766d 100644
--- a/goffice/canvas/goc-canvas.c
+++ b/goffice/canvas/goc-canvas.c
@@ -304,8 +304,10 @@ goc_canvas_init (GocCanvas *canvas)
 	                       GDK_KEY_PRESS_MASK |
 	                       GDK_KEY_RELEASE_MASK |
 	                       GDK_ENTER_NOTIFY_MASK |
-	                       GDK_SCROLL_MASK |
-	                       GDK_SMOOTH_SCROLL_MASK
+#ifdef HAVE_GDK_EVENT_GET_SCROLL_DELTAS
+	                       GDK_SMOOTH_SCROLL_MASK |
+#endif
+	                       GDK_SCROLL_MASK
 	                       );
 	g_signal_connect (G_OBJECT (w), "button-press-event", G_CALLBACK (button_press_cb), NULL);
 	g_signal_connect (G_OBJECT (w), "button-release-event", G_CALLBACK (button_release_cb), NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]