summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_key_grab.c
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-11-23 15:30:38 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-11-23 15:30:38 +0000
commita3bceeb6008f1081749e797d907da06d5f09d37b (patch)
treebbe03e2f0ed35ab96132f101221699b523a18714 /src/lib/evas/canvas/evas_key_grab.c
parentc9663b24d60f0ca883d3f5e61dd8a3927e6a62e4 (diff)
evas - Re: [E-devel] [PATCH] [EVAS] evas_object_key_grab add check for same modifiers
Hi all, I had prepare some fix for evas_object_key_grab function. In my opinion when given modifiers are equal it should return FALSE. Please verify attached file. Regards, Patrick Signed-Off-By: Patryk Kaczmarek<patryk.k@samsung.com> SVN revision: 79563
Diffstat (limited to 'src/lib/evas/canvas/evas_key_grab.c')
-rw-r--r--src/lib/evas/canvas/evas_key_grab.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_key_grab.c b/src/lib/evas/canvas/evas_key_grab.c
index 85e1761..9f65c04 100644
--- a/src/lib/evas/canvas/evas_key_grab.c
+++ b/src/lib/evas/canvas/evas_key_grab.c
@@ -158,14 +158,20 @@ _key_grab(Eo *eo_obj, void *_pd, va_list *list)
158 Evas_Key_Grab *g; 158 Evas_Key_Grab *g;
159 159
160 Evas_Object_Protected_Data *obj = _pd; 160 Evas_Object_Protected_Data *obj = _pd;
161 if (!keyname) 161 if (((modifiers == not_modifiers) && (modifiers != 0)) || (!keyname))
162 *ret = EINA_FALSE; 162 {
163 *ret = EINA_FALSE;
164 return;
165 }
163 if (exclusive) 166 if (exclusive)
164 { 167 {
165 g = evas_key_grab_find(eo_obj, obj, keyname, modifiers, not_modifiers, 168 g = evas_key_grab_find(eo_obj, obj, keyname, modifiers, not_modifiers,
166 exclusive); 169 exclusive);
167 if (g) 170 if (g)
168 *ret = EINA_FALSE; 171 {
172 *ret = EINA_FALSE;
173 return;
174 }
169 } 175 }
170 g = evas_key_grab_new(eo_obj, obj, keyname, modifiers, not_modifiers, exclusive); 176 g = evas_key_grab_new(eo_obj, obj, keyname, modifiers, not_modifiers, exclusive);
171 *ret = (!g) ? EINA_FALSE : EINA_TRUE; 177 *ret = (!g) ? EINA_FALSE : EINA_TRUE;