GTK: Replace deprecated gdk_window_get_pointer() with gdk_window_get_device_position()

This commit is contained in:
Emmanuel Gil Peyrot 2020-08-30 01:00:16 +02:00
parent 3c32aeb0f5
commit 0c9a8a5282
1 changed files with 2 additions and 2 deletions

View File

@ -1797,7 +1797,7 @@ static gboolean Stylus_Move(GtkWidget *w, GdkEventMotion *e, gpointer data)
if(click) { if(click) {
if(e->is_hint) if(e->is_hint)
gdk_window_get_pointer(gtk_widget_get_window(w), &x, &y, &state); gdk_window_get_device_position(gtk_widget_get_window(w), e->device, &x, &y, &state);
else { else {
x= (gint)e->x; x= (gint)e->x;
y= (gint)e->y; y= (gint)e->y;
@ -1833,7 +1833,7 @@ static gboolean Stylus_Press(GtkWidget * w, GdkEventButton * e,
} }
if (e->button == 1) { if (e->button == 1) {
gdk_window_get_pointer(gtk_widget_get_window(w), &x, &y, &state); gdk_window_get_device_position(gtk_widget_get_window(w), e->device, &x, &y, &state);
if(state & GDK_BUTTON1_MASK) { if(state & GDK_BUTTON1_MASK) {
#ifdef HAVE_LIBAGG #ifdef HAVE_LIBAGG