From e45b8be71b6f5a0e95db2b6f1d4d92fbe59d2cdc Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Mon, 19 Jul 2010 12:52:00 +0100 Subject: [PATCH] cookbook: Fix key press to examine modifers correctly The simple key press example in the cookbook used a brittle and incorrect switch statement to test modifier values. Instead, use logical "&" of the state with the modifiers we're interested in to check which keys were pressed. http://bugzilla.clutter-project.org/show_bug.cgi?id=2223 --- doc/cookbook/events.xml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/doc/cookbook/events.xml b/doc/cookbook/events.xml index d47ad1954..a4cc5c118 100644 --- a/doc/cookbook/events.xml +++ b/doc/cookbook/events.xml @@ -102,31 +102,26 @@ g_signal_connect (actor, "key-press-event", G_CALLBACK (_key_press_cb), NULL); +