Commit 5004b420 authored by Adrien Plazas's avatar Adrien Plazas Committed by Guido Gunther
Browse files

dialer: Do not access event fields

This is needed to port to GTK+ 4 as these fields will be private.
parent cceab42f
......@@ -186,10 +186,13 @@ key_press_event_cb (GtkWidget *widget,
HdyDialerPrivate *priv = hdy_dialer_get_instance_private (HDY_DIALER (widget));
gboolean pressed = !!GPOINTER_TO_INT (data);
guint keyval;
switch (event->keyval) {
gdk_event_get_keyval ((GdkEvent *) event, &keyval);
switch (keyval) {
case GDK_KEY_0 ... GDK_KEY_9:
press_btn (GTK_BUTTON (priv->number_btns[event->keyval % GDK_KEY_0]), pressed);
press_btn (GTK_BUTTON (priv->number_btns[keyval % GDK_KEY_0]), pressed);
case GDK_KEY_numbersign:
press_btn (GTK_BUTTON (priv->btn_hash), pressed);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment