[PATCH libinput] tools: don't use deprecated gdk_cursor_new()
Peter Hutterer
peter.hutterer at who-t.net
Tue Mar 17 16:44:09 PDT 2015
Replaced by gdk_cursor_new_from_display() which means we need to tickle the
event until it spits out a GdkDisplay.
Deprecated in gdk 3.16
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
If anyone can do a quick double-check that I'm not mis-using gdk here please
that'd be appreciated.
tools/event-gui.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/event-gui.c b/tools/event-gui.c
index 85c5ab1..75e4e19 100644
--- a/tools/event-gui.c
+++ b/tools/event-gui.c
@@ -172,6 +172,8 @@ static void
map_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
{
struct window *w = data;
+ GdkDisplay *display;
+ GdkWindow *window;
gtk_window_get_size(GTK_WINDOW(widget), &w->width, &w->height);
@@ -185,8 +187,12 @@ map_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
g_signal_connect(G_OBJECT(w->area), "draw", G_CALLBACK(draw), w);
+ window = gdk_event_get_window(event);
+ display = gdk_window_get_display(window);
+
gdk_window_set_cursor(gtk_widget_get_window(w->win),
- gdk_cursor_new(GDK_BLANK_CURSOR));
+ gdk_cursor_new_for_display(display,
+ GDK_BLANK_CURSOR));
}
static void
--
2.3.2
More information about the wayland-devel
mailing list