From 87c2377c6ab4078b4825ebcae53d151916bf2cc4 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 29 Aug 2020 04:45:38 +0200 Subject: [PATCH] =?UTF-8?q?GTK:=20Fetch=20widget=E2=80=99s=20window=20with?= =?UTF-8?q?=20the=20relevant=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- desmume/src/frontend/posix/gtk/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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