elm widget - dont get focus if object is not an elm widget
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 1 Apr 2014 00:25:21 +0000 (09:25 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 1 Apr 2014 00:26:24 +0000 (09:26 +0900)
this islences lots of missing method complaints from eo (yes - we
wantmixed elm + non elm widgets to work, thus this has to be handled)

src/lib/elm_widget.c

index aac52d4..b8fa685 100644 (file)
   ELM_WIDGET_DATA_GET(obj, sd);                      \
   if (!sd) return
 
-#define ELM_WIDGET_FOCUS_GET(obj)                                    \
-  ((_elm_access_auto_highlight_get()) ? (elm_widget_highlight_get(obj)) : \
-                                        (elm_widget_focus_get(obj)))
+#define ELM_WIDGET_FOCUS_GET(obj)                                          \
+  (eo_isa(obj, ELM_OBJ_WIDGET_CLASS) &&                                    \
+   ((_elm_access_auto_highlight_get()) ? (elm_widget_highlight_get(obj)) : \
+                                         (elm_widget_focus_get(obj))))
 
 const char SIG_WIDGET_FOCUSED[] = "focused";
 const char SIG_WIDGET_UNFOCUSED[] = "unfocused";