diff --git a/desmume/src/frontend/posix/gtk/main.cpp b/desmume/src/frontend/posix/gtk/main.cpp index 1d8f4671f..1e2473172 100644 --- a/desmume/src/frontend/posix/gtk/main.cpp +++ b/desmume/src/frontend/posix/gtk/main.cpp @@ -1768,7 +1768,7 @@ static gboolean Stylus_Move(GtkWidget *w, GdkEventMotion *e, gpointer data) if(click) { 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 { x= (gint)e->x; y= (gint)e->y; @@ -1804,7 +1804,7 @@ static gboolean Stylus_Press(GtkWidget * w, GdkEventButton * e, } 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) { #ifdef HAVE_LIBAGG