Commit 2697ac57 authored by Alexander Larsson's avatar Alexander Larsson

testinput: Fix cursor rendering

Make sure custom cursors are rendered at integer coordinates,
otherwise there will be leftover alpha borders when we remove the
parent 440e9cdf
......@@ -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));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment