]> git.donarmstrong.com Git - xournal.git/blobdiff - src/xo-misc.c
Release 0.4.0.1: GTK+ 2.11 bugfix
[xournal.git] / src / xo-misc.c
index 619ab17ca1eac3811b11a6f378b88986c89e6552..fe866da1a02ebfcf75a7f375ce409f593b08572d 100644 (file)
@@ -349,10 +349,9 @@ void fix_xinput_coords(GdkEvent *event)
   }
   else return; // nothing we know how to do
   
-  gdk_window_get_origin(event->any.window, &wx, &wy);
-  // somehow, behavior changed starting with GTK+ 2.11.0
-  if (!gtk_check_version(2, 11, 0)) sx = sy = 0;
-  else gnome_canvas_get_scroll_offsets(canvas, &sx, &sy);
+  // use canvas window, not event window (else get GTK+ 2.11 bugs!)            
+  gdk_window_get_origin(GTK_WIDGET(canvas)->window, &wx, &wy);  
+  gnome_canvas_get_scroll_offsets(canvas, &sx, &sy);
   
   axis_width = device->axes[0].max - device->axes[0].min;
   if (axis_width>EPSILON)