GTK: Fetch widget’s window with the relevant function

At this point, this version builds.  It is full of deprecated widgets
and functions though, which will have to be cleaned over time.  It also
doesn’t display any visuals in the DS emulation part yet.
This commit is contained in:
Emmanuel Gil Peyrot 2020-08-29 04:45:38 +02:00
parent cdbad3d05a
commit 87c2377c6a
1 changed files with 2 additions and 2 deletions

View File

@ -1768,7 +1768,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(w->window, &x, &y, &state); gdk_window_get_pointer(gtk_widget_get_window(w), &x, &y, &state);
else { else {
x= (gint)e->x; x= (gint)e->x;
y= (gint)e->y; y= (gint)e->y;
@ -1804,7 +1804,7 @@ static gboolean Stylus_Press(GtkWidget * w, GdkEventButton * e,
} }
if (e->button == 1) { if (e->button == 1) {
gdk_window_get_pointer(w->window, &x, &y, &state); gdk_window_get_pointer(gtk_widget_get_window(w), &x, &y, &state);
if(state & GDK_BUTTON1_MASK) { if(state & GDK_BUTTON1_MASK) {
#ifdef HAVE_LIBAGG #ifdef HAVE_LIBAGG