aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-12 07:22:06 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-12 11:45:34 +0100
commitafc08df23461d8c8691c25edabf527dc41c29bcb (patch)
tree93f920979985e6b68b5cf1bffe961e68cd0963b1
parent062b5757da8e8ee6036cfb7410aebe00fa881363 (diff)
downloadfiv-afc08df23461d8c8691c25edabf527dc41c29bcb.tar.gz
fiv-afc08df23461d8c8691c25edabf527dc41c29bcb.tar.xz
fiv-afc08df23461d8c8691c25edabf527dc41c29bcb.zip
Fix GtkWidget::key-press-event callback prototype
-rw-r--r--fastiv.c8
1 files 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();