diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-04-04 20:32:01 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-04-04 20:32:01 +0200 |
commit | 863dae68a4e71c93dcea3ec599088bc44276ae01 (patch) | |
tree | 19cd30c643040f246769de30ece082784f3601d2 | |
parent | 4615d0c1743519f7f868dad05ac1467310fade58 (diff) | |
download | cv-863dae68a4e71c93dcea3ec599088bc44276ae01.tar.gz cv-863dae68a4e71c93dcea3ec599088bc44276ae01.tar.bz2 cv-863dae68a4e71c93dcea3ec599088bc44276ae01.zip |
capture: Quit in q press event, not release
-rw-r--r-- | capture.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | |