summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichelle Legrand <michelle.legrand@openwide.fr>2015-01-28 15:11:01 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-05 16:38:07 +0100
commitc9dd8fde7dc8b4eb93381c7dcfa888ddf6282c43 (patch)
tree3c9b498470d82b1760cffc74511d91a413ab8515
parent72baccaf4494f1661aca762a26597d78a717c6ef (diff)
ecore_cocoa: replace "keyname" by "key".
Ecore_Event_Key attribute "key" cannot be NULL. This raise a segmentation fault in Enventor when hitting on modifier keys. Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa.m24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/ecore_cocoa/ecore_cocoa.m b/src/lib/ecore_cocoa/ecore_cocoa.m
index cfae44d982..23aab3f131 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa.m
@@ -365,17 +365,17 @@ ecore_cocoa_feed_events(void *anEvent)
365 365
366 // Turn special key flags on 366 // Turn special key flags on
367 if (flags & NSShiftKeyMask) 367 if (flags & NSShiftKeyMask)
368 evDown->keyname = "Shift_L"; 368 evDown->key = "Shift_L";
369 else if (flags & NSControlKeyMask) 369 else if (flags & NSControlKeyMask)
370 evDown->keyname = "Control_L"; 370 evDown->key = "Control_L";
371 else if (flags & NSAlternateKeyMask) 371 else if (flags & NSAlternateKeyMask)
372 evDown->keyname = "Alt_L"; 372 evDown->key = "Alt_L";
373 else if (flags & NSCommandKeyMask) 373 else if (flags & NSCommandKeyMask)
374 evDown->keyname = "Super_L"; 374 evDown->key = "Super_L";
375 else if (flags & NSAlphaShiftKeyMask) 375 else if (flags & NSAlphaShiftKeyMask)
376 evDown->keyname = "Caps_Lock"; 376 evDown->key = "Caps_Lock";
377 377
378 if (evDown->keyname) 378 if (evDown->key)
379 { 379 {
380 evDown->timestamp = time; 380 evDown->timestamp = time;
381 evDown->string = ""; 381 evDown->string = "";
@@ -388,17 +388,17 @@ ecore_cocoa_feed_events(void *anEvent)
388 388
389 // Turn special key flags off 389 // Turn special key flags off
390 if (changed_flags & NSShiftKeyMask) 390 if (changed_flags & NSShiftKeyMask)
391 evUp->keyname = "Shift_L"; 391 evUp->key = "Shift_L";
392 else if (changed_flags & NSControlKeyMask) 392 else if (changed_flags & NSControlKeyMask)
393 evUp->keyname = "Control_L"; 393 evUp->key = "Control_L";
394 else if (changed_flags & NSAlternateKeyMask) 394 else if (changed_flags & NSAlternateKeyMask)
395 evUp->keyname = "Alt_L"; 395 evUp->key = "Alt_L";
396 else if (changed_flags & NSCommandKeyMask) 396 else if (changed_flags & NSCommandKeyMask)
397 evUp->keyname = "Super_L"; 397 evUp->key = "Super_L";
398 else if (changed_flags & NSAlphaShiftKeyMask) 398 else if (changed_flags & NSAlphaShiftKeyMask)
399 evUp->keyname = "Caps_Lock"; 399 evUp->key = "Caps_Lock";
400 400
401 if (evUp->keyname) 401 if (evUp->key)
402 { 402 {
403 evUp->timestamp = time; 403 evUp->timestamp = time;
404 evUp->string = ""; 404 evUp->string = "";