From 863dae68a4e71c93dcea3ec599088bc44276ae01 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 4 Apr 2012 20:32:01 +0200 Subject: capture: Quit in q press event, not release --- capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/capture.c b/capture.c index a32338a..0c95796 100644 --- a/capture.c +++ b/capture.c @@ -86,7 +86,7 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *event, gpointer userdata) { switch (event->type) { - case GDK_KEY_RELEASE: + case GDK_KEY_PRESS: switch (event->keyval) { case GDK_KEY_q: case GDK_KEY_Q: @@ -226,7 +226,7 @@ main(int argc, char *argv[]) g_signal_connect(ct.window, "destroy", G_CALLBACK(gtk_main_quit), NULL); - g_signal_connect(ct.window, "key-release-event", + g_signal_connect(ct.window, "key-press-event", G_CALLBACK(key_event), &ct); gtk_widget_set_events(ct.drawing_area, GDK_BUTTON1_MOTION_MASK | -- cgit