From e8114411dce02fb31a2ee0d6846d6a910529d6f6 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 7 Jul 2022 21:12:34 +0300 Subject: [PATCH 50/50] gtk3.22: Fix GdkEvent cast alignment increase error Seen when compiling with clang on x32. See osdn #44920 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.22/gui_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/gui-gtk-3.22/gui_main.c b/client/gui-gtk-3.22/gui_main.c index b989038997..1d2b8541e6 100644 --- a/client/gui-gtk-3.22/gui_main.c +++ b/client/gui-gtk-3.22/gui_main.c @@ -389,7 +389,7 @@ gboolean map_canvas_focus(void) This function ensures an entry widget (like the inputline) always gets first dibs at handling a keyboard event. **************************************************************************/ -static gboolean toplevel_handler(GtkWidget *w, GdkEventKey *ev, gpointer data) +static gboolean toplevel_handler(GtkWidget *w, GdkEvent *ev, gpointer data) { GtkWidget *focus; @@ -399,7 +399,7 @@ static gboolean toplevel_handler(GtkWidget *w, GdkEventKey *ev, gpointer data) || (GTK_IS_TEXT_VIEW(focus) && gtk_text_view_get_editable(GTK_TEXT_VIEW(focus)))) { /* Propagate event to currently focused entry widget. */ - if (gtk_widget_event(focus, (GdkEvent *) ev)) { + if (gtk_widget_event(focus, ev)) { /* Do not propagate event to our children. */ return TRUE; } @@ -818,9 +818,9 @@ static void tearoff_destroy(GtkWidget *w, gpointer data) /**********************************************************************//** Propagates a keypress in a tearoff back to the toplevel window. **************************************************************************/ -static gboolean propagate_keypress(GtkWidget *w, GdkEventKey *ev) +static gboolean propagate_keypress(GtkWidget *w, GdkEvent *ev) { - gtk_widget_event(toplevel, (GdkEvent *)ev); + gtk_widget_event(toplevel, ev); return FALSE; } -- 2.35.1