summaryrefslogtreecommitdiff
path: root/src/lib/ecore_input_evas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 15:12:49 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 18:37:05 +0900
commita92186be6ab7ba6b8ba0b2bedeaec51dcb4a3898 (patch)
treec22e99af65360feb242ead4bccd12acee605d424 /src/lib/ecore_input_evas
parentf2b5b00ca204e8a0b8c4ab671f60088da4edfca3 (diff)
ecore/edje/elm: Fix a few WRN from calls to NULL
This fixes some of the warnings generated by calling functions on NULL objects. One of the main remaining points is to avoid unwanted warnings on non-existing parts. Ref T6326
Diffstat (limited to 'src/lib/ecore_input_evas')
-rw-r--r--src/lib/ecore_input_evas/ecore_input_evas.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c b/src/lib/ecore_input_evas/ecore_input_evas.c
index 7866bd5d9a..bd2f0d1868 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -417,12 +417,12 @@ static Eina_Bool
417_ecore_event_evas_key(Ecore_Event_Key *e, Ecore_Event_Press press) 417_ecore_event_evas_key(Ecore_Event_Key *e, Ecore_Event_Press press)
418{ 418{
419 Ecore_Input_Window *lookup; 419 Ecore_Input_Window *lookup;
420 Eo *seat;
420 421
421 lookup = _ecore_event_window_match(e->event_window); 422 lookup = _ecore_event_window_match(e->event_window);
422 if (!lookup) return ECORE_CALLBACK_PASS_ON; 423 if (!lookup) return ECORE_CALLBACK_PASS_ON;
423 ecore_event_evas_seat_modifier_lock_update(lookup->evas, 424 seat = e->dev ? efl_input_device_seat_get(e->dev) : NULL;
424 e->modifiers, 425 ecore_event_evas_seat_modifier_lock_update(lookup->evas, e->modifiers, seat);
425 efl_input_device_seat_get(e->dev));
426 if (press == ECORE_DOWN) 426 if (press == ECORE_DOWN)
427 { 427 {
428 if (!lookup->direct || 428 if (!lookup->direct ||
@@ -531,9 +531,8 @@ _ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Press pr
531 531
532 if (e->multi.device == 0) 532 if (e->multi.device == 0)
533 { 533 {
534 ecore_event_evas_seat_modifier_lock_update(lookup->evas, 534 Eo *seat = e->dev ? efl_input_device_seat_get(e->dev) : NULL;
535 e->modifiers, 535 ecore_event_evas_seat_modifier_lock_update(lookup->evas, e->modifiers, seat);
536 efl_input_device_seat_get(e->dev));
537 if (press == ECORE_DOWN) 536 if (press == ECORE_DOWN)
538 { 537 {
539 if (!lookup->direct || 538 if (!lookup->direct ||
@@ -612,10 +611,9 @@ ecore_event_evas_mouse_move(void *data EINA_UNUSED, int type EINA_UNUSED, void *
612 if (!lookup) return ECORE_CALLBACK_PASS_ON; 611 if (!lookup) return ECORE_CALLBACK_PASS_ON;
613 if (e->multi.device == 0) 612 if (e->multi.device == 0)
614 { 613 {
614 Eo *seat = e->dev ? efl_input_device_seat_get(e->dev) : NULL;
615 _ecore_event_evas_push_mouse_move(e); 615 _ecore_event_evas_push_mouse_move(e);
616 ecore_event_evas_seat_modifier_lock_update(lookup->evas, 616 ecore_event_evas_seat_modifier_lock_update(lookup->evas, e->modifiers, seat);
617 e->modifiers,
618 efl_input_device_seat_get(e->dev));
619 if (!lookup->direct || 617 if (!lookup->direct ||
620 !lookup->direct(lookup->window, ECORE_EVENT_MOUSE_MOVE, e)) 618 !lookup->direct(lookup->window, ECORE_EVENT_MOUSE_MOVE, e))
621 { 619 {
@@ -671,12 +669,13 @@ static Eina_Bool
671_ecore_event_evas_mouse_io(Ecore_Event_Mouse_IO *e, Ecore_Event_IO io) 669_ecore_event_evas_mouse_io(Ecore_Event_Mouse_IO *e, Ecore_Event_IO io)
672{ 670{
673 Ecore_Input_Window *lookup; 671 Ecore_Input_Window *lookup;
672 Eo *seat;
674 673
675 lookup = _ecore_event_window_match(e->event_window); 674 lookup = _ecore_event_window_match(e->event_window);
676 if (!lookup) return ECORE_CALLBACK_PASS_ON; 675 if (!lookup) return ECORE_CALLBACK_PASS_ON;
677 ecore_event_evas_seat_modifier_lock_update(lookup->evas, 676 seat = e->dev ? efl_input_device_seat_get(e->dev) : NULL;
678 e->modifiers, 677 ecore_event_evas_seat_modifier_lock_update(lookup->evas, e->modifiers, seat);
679 efl_input_device_seat_get(e->dev)); 678
680 switch (io) 679 switch (io)
681 { 680 {
682 case ECORE_IN: 681 case ECORE_IN:
@@ -718,12 +717,13 @@ ecore_event_evas_mouse_wheel(void *data EINA_UNUSED, int type EINA_UNUSED, void
718{ 717{
719 Ecore_Event_Mouse_Wheel *e; 718 Ecore_Event_Mouse_Wheel *e;
720 Ecore_Input_Window *lookup; 719 Ecore_Input_Window *lookup;
720 Eo *seat;
721 721
722 e = event; 722 e = event;
723 lookup = _ecore_event_window_match(e->event_window); 723 lookup = _ecore_event_window_match(e->event_window);
724 if (!lookup) return ECORE_CALLBACK_PASS_ON; 724 if (!lookup) return ECORE_CALLBACK_PASS_ON;
725 ecore_event_evas_seat_modifier_lock_update(lookup->evas, e->modifiers, 725 seat = e->dev ? efl_input_device_seat_get(e->dev) : NULL;
726 efl_input_device_seat_get(e->dev)); 726 ecore_event_evas_seat_modifier_lock_update(lookup->evas, e->modifiers, seat);
727 if (!lookup->direct || 727 if (!lookup->direct ||
728 !lookup->direct(lookup->window, ECORE_EVENT_MOUSE_WHEEL, e)) 728 !lookup->direct(lookup->window, ECORE_EVENT_MOUSE_WHEEL, e))
729 { 729 {