From 069f26b815207778d2f878aff91789f1a479dcfc Mon Sep 17 00:00:00 2001 From: Marko Lindqvist <cazfi74@gmail.com> Date: Thu, 7 Jul 2022 21:12:34 +0300 Subject: [PATCH 31/31] gtk3/.22: Fix GdkEvent cast alignment increase error Seen when compiling with clang on x32. See osdn #44920 Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> --- client/gui-gtk-3.0/gui_main.c | 8 ++++---- client/gui-gtk-3.22/gui_main.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/gui-gtk-3.0/gui_main.c b/client/gui-gtk-3.0/gui_main.c index 6e671e41ff..aa3c81eed9 100644 --- a/client/gui-gtk-3.0/gui_main.c +++ b/client/gui-gtk-3.0/gui_main.c @@ -377,7 +377,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; @@ -387,7 +387,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; } @@ -779,9 +779,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; } diff --git a/client/gui-gtk-3.22/gui_main.c b/client/gui-gtk-3.22/gui_main.c index 66a09287f8..03bfca832c 100644 --- a/client/gui-gtk-3.22/gui_main.c +++ b/client/gui-gtk-3.22/gui_main.c @@ -356,7 +356,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; @@ -366,7 +366,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; } @@ -765,9 +765,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