]> Pileus Git - ~andy/gtk/blobdiff - tests/testinput.c
stylecontext: Do invalidation on first resize container
[~andy/gtk] / tests / testinput.c
index 957e6ae122d3a3380a427a7e43bcf0ab406c967d..2a2e4cc8eeda570280ce3ccaeeb1e2e7911b7f7d 100644 (file)
@@ -25,6 +25,7 @@
 #include "config.h"
 #include <stdio.h>
 #include "gtk/gtk.h"
+#include <math.h>
 
 /* Backing surface for drawing area */
 
@@ -46,6 +47,9 @@ update_cursor (GtkWidget *widget,  gdouble x, gdouble y)
   static gint cursor_present = 0;
   gint state = !gdk_device_get_has_cursor (current_device) && cursor_proximity;
 
+  x = floor (x);
+  y = floor (y);
+
   if (surface != NULL)
     {
       cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget));