Commit a2d37b8e authored by Sebastian Ramacher's avatar Sebastian Ramacher

Simplify

parent 169d66c0
......@@ -743,15 +743,13 @@ simulate_key_press(girara_session_t* session, int state, int key)
GdkEvent* event = gdk_event_new(GDK_KEY_PRESS);
event->key.type = GDK_KEY_PRESS;
event->key.window = gtk_widget_get_parent_window(GTK_WIDGET(session->gtk.box));
event->any.type = GDK_KEY_PRESS;
event->key.window = g_object_ref(gtk_widget_get_parent_window(GTK_WIDGET(session->gtk.box)));
event->key.send_event = false;
event->key.time = GDK_CURRENT_TIME;
event->key.state = state;
event->key.keyval = key;
g_object_ref(event->key.window);
GdkDisplay* display = gtk_widget_get_display(GTK_WIDGET(session->gtk.box));
GdkKeymapKey* keys = NULL;
gint number_of_keys = 0;
......
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