The e_desk_area implements the e_comp_object_lower function.
Change-Id: Ia7c48af5edb363210cae5e9e093490cfe752d5cc
}
}
+#ifdef REFACTOR_DESK_AREA
+EINTERN void
+_e_comp_object_lower(E_Comp_Object *cw, Evas_Object *obj)
+#else
static void
_e_comp_object_lower(E_Comp_Object *cw, Evas_Object *obj)
+#endif
{
evas_object_lower(obj);
if (ec)
{
_e_comp_object_hook_call(E_COMP_OBJECT_HOOK_RESTACK, ec);
+#ifdef REFACTOR_DESK_AREA
+ wl_signal_emit_mutable(&cw->events.lower_done, NULL);
+#else
wl_signal_emit_mutable(&cw->events.lower, NULL);
+#endif
}
}
}
_e_comp_intercept_lower(void *data, Evas_Object *obj)
{
E_Comp_Object *cw = data;
+
+#ifdef REFACTOR_DESK_AREA
+#else
Evas_Object *o;
+#endif
TRACE_DS_BEGIN(COMP:INTERCEPT LOWER);
+#ifdef REFACTOR_DESK_AREA
+ wl_signal_emit_mutable(&cw->events.lower, cw);
+ wl_signal_emit_mutable(&cw->events.lower_done, cw);
+#else
if ((cw->ec->layer_block) || (cw->ec->layer_pending))
{
if (cw->ec->layer_pending)
_e_comp_object_transform_obj_stack_update(obj);
end:
+#endif
TRACE_DS_END();
}
wl_signal_init(&cw->events.lower);
#ifdef REFACTOR_DESK_AREA
+ wl_signal_init(&cw->events.lower_done);
wl_signal_init(&cw->events.raise);
#endif
wl_signal_init(&cw->events.show);
#ifdef REFACTOR_DESK_AREA
EINTERN void
+e_comp_object_lower_done_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.lower_done, listener);
+}
+
+EINTERN void
e_comp_object_raise_listener_add(Evas_Object *obj, struct wl_listener *listener)
{
API_ENTRY;
struct
{
struct wl_signal lower;
+ struct wl_signal lower_done;
struct wl_signal raise;
struct wl_signal show;
struct wl_signal hide;
EINTERN void _e_comp_object_layers_add(E_Comp_Object *cw, E_Comp_Object *above, E_Comp_Object *below, Eina_Bool prepend);
EINTERN void _e_comp_object_layers_remove(E_Comp_Object *cw);
+EINTERN void _e_comp_object_lower(E_Comp_Object *cw, Evas_Object *obj);
EINTERN void e_comp_object_layer_set(Evas_Object *obj, short layer);
EINTERN void _e_comp_object_stack_above(Evas_Object *obj, Evas_Object *target);
EINTERN void _e_comp_object_stack_below(Evas_Object *obj, Evas_Object *target);
EINTERN void e_comp_object_lower_listener_add(Evas_Object *obj, struct wl_listener *listener);
//#ifdef REFACTOR_DESK_AREA
+EINTERN void e_comp_object_lower_done_listener_add(Evas_Object *obj, struct wl_listener *listener);
EINTERN void e_comp_object_raise_listener_add(Evas_Object *obj, struct wl_listener *listener);
//#endif
EINTERN void e_comp_object_show_listener_add(Evas_Object *obj, struct wl_listener *listener);
static void
_desk_area_cb_comp_object_lower(struct wl_listener *listener, void *data)
{
- // TODO:
+ E_Desk_Area_Private_Client *eda_client;
+ E_Client *ec;
+ Evas_Object *obj, *o;
+ E_Comp_Object *cw;
+
+ eda_client = wl_container_of(listener, eda_client, comp_object_lower);
+ ec = eda_client->ec;
+ obj = ec->frame;
+ cw = (E_Comp_Object *)data;
+
+ if ((cw->ec->layer_block) || (cw->ec->layer_pending))
+ {
+ if (cw->ec->layer_pending)
+ e_comp_object_layer_update(obj, NULL, obj);
+
+ _e_comp_object_lower(cw, obj);
+ return;
+ }
+
+ if (!EINA_INLIST_GET(cw->ec)->prev) return; //already lowest on layer
+
+ o = evas_object_below_get(obj);
+ _e_comp_object_layers_remove(cw);
+ /* prepend to client list since this client should be the first item now */
+ _e_comp_object_layers_add(cw, NULL, NULL, 1);
+ if (evas_object_layer_get(o) != evas_object_layer_get(obj)) return; //already at bottom!
+
+ evas_object_data_set(obj, "client_restack", (void*)1);
+ _e_comp_object_lower(cw, obj);
+ evas_object_data_del(obj, "client_restack");
+
+ if (!cw->visible) return;
+ e_comp_render_queue();
+ _e_comp_object_transform_obj_stack_update(obj);
}
static void
struct wl_listener client_eval_end;
struct wl_listener stack_transient_for_done;
+#ifdef REFACTOR_DESK_AREA
+ struct wl_listener comp_object_lower_done;
+#else
struct wl_listener comp_object_lower;
+#endif
struct wl_listener comp_object_show;
struct wl_listener comp_object_hide;
};
wl_list_remove(&history_client->comp_object_hide.link);
wl_list_remove(&history_client->comp_object_show.link);
+#ifdef REFACTOR_DESK_AREA
+ wl_list_remove(&history_client->comp_object_lower_done.link);
+#else
wl_list_remove(&history_client->comp_object_lower.link);
+#endif
wl_list_remove(&history_client->stack_transient_for_done.link);
wl_list_remove(&history_client->client_eval_end.link);
e_client_frame_focus_set(new_focus, EINA_TRUE);
}
+#ifdef REFACTOR_DESK_AREA
+static void
+_focus_policy_history_cb_comp_object_lower_done(struct wl_listener *listener, void *data)
+#else
static void
_focus_policy_history_cb_comp_object_lower(struct wl_listener *listener, void *data)
+#endif
{
E_Focus_Policy_History_Client *history_client;
E_Focus_Policy_History *history_policy;
E_Client *ec;
+#ifdef REFACTOR_DESK_AREA
+ history_client = wl_container_of(listener, history_client, comp_object_lower_done);
+#else
history_client = wl_container_of(listener, history_client, comp_object_lower);
+#endif
history_policy = history_client->history_policy;
EINA_SAFETY_ON_NULL_RETURN(history_policy);
e_client_stack_transient_for_done_listener_add(ec, &history_client->stack_transient_for_done);
// e_comp_object listeners
+#ifdef REFACTOR_DESK_AREA
+ history_client->comp_object_lower_done.notify = _focus_policy_history_cb_comp_object_lower_done;
+ e_comp_object_lower_done_listener_add(obj, &history_client->comp_object_lower_done);
+#else
history_client->comp_object_lower.notify = _focus_policy_history_cb_comp_object_lower;
e_comp_object_lower_listener_add(obj, &history_client->comp_object_lower);
+#endif
history_client->comp_object_show.notify = _focus_policy_history_cb_comp_object_show;
e_comp_object_show_listener_add(obj, &history_client->comp_object_show);
history_client->comp_object_hide.notify = _focus_policy_history_cb_comp_object_hide;