Hi!
Thanks for your response. The patch have been refined and attached.
I have moved MOVE,RESIZE callback handling to elm_conformant_add() from
_prop_change().

Sincerely,
Shinwoo Kim.


2011/6/20 Carsten Haitzler <ras...@rasterman.com>

> On Thu, 16 Jun 2011 18:43:09 +0900 cnook <kimci...@gmail.com> said:
>
> > Dear All,
> >
> > Hello~
> >
> > When the indicator is displayed initially and use elm_confrom as parent
> by
> > using elm_conformant_content_area_get, the indicator area (wd->shelf)
> does
> > not display properly.
> > Because any interested ECORE_X_EVENT_WINDOW_PROPERTY does not notify.
> > In this case, we have got to evaluate size, when EVAS_CALLBACK_RESIZE
> > occurs.
>
> hmmm i see a problem. you add the resize callback (technically you should
> do it
> on BOTH a move AND), but you dont remove the callbacks added once the
> illume
> zone property change event comes in so we have this being called multiple
> times. maybe you want to just add the move and resize callback handling on
> widget create (like you do with resize alone) and remove the code that adds
> the
> event handlers in _prop_change() ?
>
> > And I have a query...
> > When the event with ECORE_X_ATOM_E_ILLUME_ZONE occurs?
>
> e sets this property on the client window itself. this property has in it
> the
> window id that contains zone information (different screens looking at the
> same
> root window will see different "zones"). this property is SET when the
> illume
> policy get a border add (thus letting the app be able to know where to get
> zone
> info). it will happen after a map request by a client then, so when the app
> sees the prop change it knows the wm has now managed it and told it where
> to
> find zone info so it can get indicator and other info correctly for that
> zone.
>
> see policy.c from the illume2 module. ecore_x_e_illume_zone_set(0 sets the
> prop
> on the client window. :)
>
> >
> > Sincerely,
> > Shinwoo Kim.
>
>
> --
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> The Rasterman (Carsten Haitzler)    ras...@rasterman.com
>
>
Index: src/lib/elm_conform.c
===================================================================
--- src/lib/elm_conform.c	(revision 60611)
+++ src/lib/elm_conform.c	(working copy)
@@ -24,8 +24,8 @@
    Evas_Object *shelf, *panel, *virtualkeypad;
    Evas_Object *content;
    Evas_Object *scroller;
+#ifdef HAVE_ELEMENTARY_X
    Ecore_Event_Handler *prop_hdl;
-#ifdef HAVE_ELEMENTARY_X
    Ecore_X_Virtual_Keyboard_State vkb_state;
 #endif
    struct
@@ -51,6 +51,7 @@
 
 /* local function prototypes */
 static const char *widtype = NULL;
+static void _del_pre_hook(Evas_Object *obj);
 static void _del_hook(Evas_Object *obj);
 static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
 static void _theme_hook(Evas_Object *obj);
@@ -65,17 +66,31 @@
 static void _conformant_part_sizing_eval(Evas_Object *obj,
                                          Conformant_Part_Type part_type);
 #endif
+static void
+_conformant_move_resize_event_cb(void *data, Evas *e, Evas_Object *obj,
+                                 void *event_info);
 static void _sizing_eval(Evas_Object *obj);
 static Eina_Bool _prop_change(void *data, int type, void *event);
 
 /* local functions */
 static void
+_del_pre_hook(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+#ifdef HAVE_ELEMENTARY_X
+   if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl);
+#endif
+   evas_object_event_callback_del_full(obj, EVAS_CALLBACK_RESIZE, _conformant_move_resize_event_cb, obj);
+   evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOVE, _conformant_move_resize_event_cb, obj);
+}
+
+static void
 _del_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
 
    if (!wd) return;
-   if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl);
    free(wd);
 }
 
@@ -404,10 +419,6 @@
                       ELM_CONFORM_SOFTKEY_PART |
                       ELM_CONFORM_VIRTUAL_KEYPAD_PART);
         _conformant_part_sizing_eval(data, part_type);
-        evas_object_event_callback_add(data, EVAS_CALLBACK_RESIZE,
-                                       _conformant_move_resize_event_cb, data);
-        evas_object_event_callback_add(data, EVAS_CALLBACK_MOVE,
-                                       _conformant_move_resize_event_cb, data);
      }
    else if (ev->atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY)
      _conformant_part_sizing_eval(data, ELM_CONFORM_INDICATOR_PART);
@@ -479,6 +490,10 @@
 #endif
 
    evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
+   evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
+                                       _conformant_move_resize_event_cb, obj);
+   evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE,
+                                       _conformant_move_resize_event_cb, obj);
 
    _mirrored_set(obj, elm_widget_mirrored_get(obj));
    _sizing_eval(obj);
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to