Mouse wheel events elm-propagated too.
authorGustavo Lima Chaves <glima@profusion.mobi>
Mon, 6 Dec 2010 12:45:41 +0000 (12:45 +0000)
committerGustavo Lima Chaves <glima@profusion.mobi>
Mon, 6 Dec 2010 12:45:41 +0000 (12:45 +0000)
SVN revision: 55324

src/lib/elm_widget.c

index 2e65538e402f8144e0ed22c2efc7799b325143ba..f81dd43d1aa69861fb7dfd1d4e8e7e514ae3d58b 100644 (file)
@@ -241,6 +241,12 @@ _propagate_event(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_i
              event_flags = &(ev->event_flags);
              break;
           }
+     case EVAS_CALLBACK_MOUSE_WHEEL:
+          {
+             Evas_Event_Mouse_Wheel *ev = event_info;
+             event_flags = &(ev->event_flags);
+             break;
+          }
      default:
         break;
      }
@@ -780,6 +786,9 @@ elm_widget_can_focus_set(Evas_Object *obj, Eina_Bool can_focus)
         evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_UP,
                                        _propagate_event,
                                        (void *)(long) EVAS_CALLBACK_KEY_UP);
+        evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_WHEEL,
+                                       _propagate_event,
+                                       (void *)(long)EVAS_CALLBACK_MOUSE_WHEEL);
      }
    else
      {
@@ -787,6 +796,8 @@ elm_widget_can_focus_set(Evas_Object *obj, Eina_Bool can_focus)
                                        _propagate_event);
         evas_object_event_callback_del(obj, EVAS_CALLBACK_KEY_UP,
                                        _propagate_event);
+        evas_object_event_callback_del(obj, EVAS_CALLBACK_MOUSE_WHEEL,
+                                       _propagate_event);
      }
 }