From afc08df23461d8c8691c25edabf527dc41c29bcb Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Fri, 12 Nov 2021 07:22:06 +0100 Subject: Fix GtkWidget::key-press-event callback prototype --- fastiv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fastiv.c b/fastiv.c index 27093fb..17fc470 100644 --- a/fastiv.c +++ b/fastiv.c @@ -250,12 +250,12 @@ on_item_activated(G_GNUC_UNUSED FastivBrowser *browser, const char *path, // g_signal_connect{,after}(), or overriding the handler and either tactically // chaining up or using gtk_window_propagate_key_event(). static gboolean -on_key_press(G_GNUC_UNUSED GtkWidget *widget, GdkEvent *event, +on_key_press(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event, G_GNUC_UNUSED gpointer data) { - switch (event->key.state & gtk_accelerator_get_default_mod_mask()) { + switch (event->state & gtk_accelerator_get_default_mod_mask()) { case GDK_CONTROL_MASK: - switch (event->key.keyval) { + switch (event->keyval) { case GDK_KEY_o: on_open(); return TRUE; @@ -270,7 +270,7 @@ on_key_press(G_GNUC_UNUSED GtkWidget *widget, GdkEvent *event, } break; case 0: - switch (event->key.keyval) { + switch (event->keyval) { case GDK_KEY_Escape: case GDK_KEY_q: gtk_main_quit(); -- cgit v1.2.3-70-g09d2