-#include "e.h"
-#ifdef REFACTOR_DESK_AREA
#include "e_comp_object_intern.h"
-#endif
#include "e_bindings_intern.h"
#include "e_utils_intern.h"
-#ifdef REFACTOR_DESK_AREA
-#else
#include "e_comp_canvas_intern.h"
-#endif
-
#include "e_comp_cfdata_intern.h"
#include "e_comp_wl_subsurface_intern.h"
#include "e_comp_wl_tbm_intern.h"
#include "e_comp_intern.h"
+#include "e_pixmap_intern.h"
+#include "e_map_intern.h"
+#include "e_hwc_window_intern.h"
+#include "e_hwc_windows_intern.h"
+#include "e_policy_visibility_intern.h"
+#include "e_client_video_intern.h"
+#include "e_client_intern.h"
+#include "e_zone_intern.h"
+#include "e_theme_intern.h"
+#include "e_config_intern.h"
/* data keys:
#define RENDER_DEBUG(...)
#endif
-#ifdef REFACTOR_DESK_AREA
-#else
-typedef struct _E_Comp_Object
-{
- EINA_INLIST;
-
- int x, y, w, h; // geometry
-
- E_Client *ec;
-
- E_Comp_Object_Frame client_inset;
-
- Eina_Stringshare *frame_theme;
- Eina_Stringshare *frame_name;
- Eina_Stringshare *visibility_effect; //effect when toggling visibility
-
- E_Comp_Object_Content_Type content_type; // type of e.swallow.content
-
- Evas_Object *smart_obj; // smart object
- Evas_Object *clip; // clipper over effect object
- Evas_Object *input_obj; // input smart object
- Evas_Object *obj; // composite object
- Evas_Object *frame_object; // for client frames
- Evas_Object *shobj; // shadow object
- Evas_Object *effect_obj; // effects object
- Evas_Object *transform_bg_obj; // transform backgroung with keep_ratio option
- struct
- {
- int r, g, b, a;
- } transform_bg_color;
- Evas_Object *transform_tranp_obj;// transform transp rect obj
- Evas_Object *default_input_obj; // default input object
- unsigned int layer; //e_comp_canvas_layer_map(cw->ec->layer)
- Eina_List *obj_mirror; // extra mirror objects
- Eina_Tiler *updates; //render update regions
- Eina_Tiler *pending_updates; //render update regions which are about to render
-
- Evas_Native_Surface *ns; //for custom gl rendering
-
- struct wl_listener buffer_destroy_listener;
-
- unsigned int update_count; // how many updates have happened to this obj
-
- unsigned int opacity; // opacity set with _NET_WM_WINDOW_OPACITY
-
- unsigned int animating; // it's busy animating
- unsigned int failures; //number of consecutive e_pixmap_image_draw() failures
- unsigned int force_visible; //number of visible obj_mirror objects
- Eina_Bool delete_pending : 1; // delete pending
- Eina_Bool defer_hide : 1; // flag to get hide to work on deferred hide
- Eina_Bool showing : 1; // object is currently in "show" animation
- Eina_Bool hiding : 1; // object is currently in "hide" animation
- Eina_Bool visible : 1; // is visible
-
- Eina_Bool shaped : 1; // is shaped
- Eina_Bool update : 1; // has updates to fetch
- Eina_Bool redirected : 1; // has updates to fetch
- Eina_Bool native : 1; // native
-
- Eina_Bool nocomp : 1; // nocomp applied
- Eina_Bool hwc_need_update : 1; // this window updated while on e_plane to do hw composite
- Eina_Bool real_hid : 1; // last hide was a real window unmap
-
- Eina_Bool effect_set : 1; //effect_obj has a valid group
- Eina_Bool effect_running : 1; //effect_obj is playing an animation
- Eina_Bool effect_clip : 1; //effect_obj is clipped
- Eina_Bool effect_clip_able : 1; //effect_obj will be clipped for effects
-
- Eina_Bool updates_exist : 1;
- Eina_Bool updates_full : 1; // entire object will be updated
-
- Eina_Bool force_move : 1;
- Eina_Bool frame_extends : 1; //frame may extend beyond object size
- Eina_Bool blanked : 1; //window is rendering blank content (externally composited)
- Eina_Bool external_content : 1; // e.swallow.content(obj) is set by external evas object
- Eina_Bool user_alpha_set : 1;
- Eina_Bool user_alpha : 1;
-
- struct
- {
- Evas_Object *obj; // mask object: transparent parts of this comp object allow to copy the alpha to current H/W plane.
- Evas_Render_Op saved_render_op; // saved render operation value to restore when clear a mask.
- } mask;
-
- struct
- {
- Evas_Object *obj;
- int w, h;
- } indicator; //indicator object for internal client
-
- struct
- {
- Evas_Object *mask_obj;
- Eina_Bool enable;
- Eina_Bool mask_set;
- int mask_x, mask_y, mask_w, mask_h;
- } dim;
-
- Eina_Bool render_trace : 1; // trace co->obj rendering on canvas
-
- tbm_surface_h tbm_surface;
- E_Comp_Image_Filter image_filter;
- Eina_Bool set_mouse_callbacks;
-
- struct
- {
- int lock;
- E_Comp_Wl_Buffer_Ref buffer_ref;
- Eina_Bool pending_move_set;
- int pending_move_x, pending_move_y;
- Eina_Bool pending_resize_set;
- int pending_resize_w, pending_resize_h;
- } render_update_lock;
-
- struct
- {
- Eina_Bool set;
- int user_r;
- int user_g;
- int user_b;
- int user_a;
- } transparent;
-
- struct
- {
- struct wl_signal lower;
-//#ifdef REFACTOR_DESK_AREA
- struct wl_signal raise;
-//#endif
- struct wl_signal show;
- struct wl_signal hide;
-//#ifdef REFACTOR_DESK_AREA
- struct wl_signal set_layer;
- struct wl_signal stack_above;
- struct wl_signal stack_below;
-//#endif
- } events;
-} E_Comp_Object;
-#endif
-
typedef struct _E_Input_Rect_Data
{
Eina_Rectangle rect;
[E_COMP_OBJECT_HOOK_MASK_OBJECT_SET] = NULL,
[E_COMP_OBJECT_HOOK_MASK_OBJECT_UNSET] = NULL,
[E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_SET] = NULL,
+ [E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_UNSET] = NULL,
};
#ifdef _F_E_COMP_OBJECT_INTERCEPT_HOOK_
static void _e_comp_object_native_surface_set(E_Comp_Object *cw, Evas_Native_Surface *ns, Eina_Bool with_mirror);
#ifdef REFACTOR_DESK_AREA
#else
-static void _e_comp_object_layer_set(Evas_Object *obj, short layer);
+static void _e_comp_object_lower(E_Comp_Object *cw, Evas_Object *obj);
+static void _e_comp_object_raise(Evas_Object *obj);
+static void _e_comp_object_layer_set(Evas_Object *obj, short layer);
+static void _e_comp_object_stack_above(Evas_Object *obj, Evas_Object *target);
+static void _e_comp_object_stack_below(Evas_Object *obj, Evas_Object *target);
+static void _e_comp_object_transform_obj_stack_update(Evas_Object *obj);
#endif
static E_Client *dim_client = NULL;
(hookpoint != E_COMP_OBJECT_HOOK_RESTACK) &&
(hookpoint != E_COMP_OBJECT_HOOK_MASK_OBJECT_SET) &&
(hookpoint != E_COMP_OBJECT_HOOK_MASK_OBJECT_UNSET) &&
- (hookpoint != E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_SET)
+ (hookpoint != E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_SET) &&
+ (hookpoint != E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_UNSET)
)
{
return ret;
#ifdef REFACTOR_DESK_AREA
EINTERN void
-_e_comp_object_transform_obj_stack_update(Evas_Object *obj)
+e_comp_object_transform_obj_stack_update(Evas_Object *obj)
#else
static void
_e_comp_object_transform_obj_stack_update(Evas_Object *obj)
#ifdef REFACTOR_DESK_AREA
#else
static void
+_e_comp_input_thread_layers_update(void *data)
+{
+ E_Comp_Input_Layer_Data *layer_data = data;
+ EINA_SAFETY_ON_NULL_RETURN(layer_data);
+
+ INF("[input thread|%s] layer(%u), function type(%d), item(%p), relative(%p)\n",
+ __func__, layer_data->layer, layer_data->type, layer_data->item, layer_data->relative);
+ e_comp_input_layers_update(layer_data);
+}
+
+static void
+_e_comp_object_layers_update(unsigned int layer, E_Comp_Input_Inlist_Function_Type type, E_Client *item, E_Client *relative)
+{
+ E_Comp_Input_Layer_Data layer_data;
+ memset(&layer_data, 0, sizeof(E_Comp_Input_Layer_Data));
+
+ layer_data.layer = layer;
+ layer_data.type = type;
+ layer_data.item = item;
+ layer_data.relative = relative;
+
+ INF("[%s] layer(%u), function type(%d), item(%p), relative(%p)\n", __func__, layer, type, item, relative);
+ e_input_thread_safe_call(_e_comp_input_thread_layers_update, &layer_data, sizeof(E_Comp_Input_Layer_Data));
+}
+
+static void
_e_comp_object_layers_add(E_Comp_Object *cw, E_Comp_Object *above, E_Comp_Object *below, Eina_Bool prepend)
{
g_rec_mutex_lock(&e_comp->ec_list_mutex);
if (above)
- e_comp->layers[above->layer].clients = eina_inlist_append_relative(e_comp->layers[above->layer].clients, EINA_INLIST_GET(cw->ec), EINA_INLIST_GET(above->ec));
+ {
+ e_comp->layers[above->layer].clients = eina_inlist_append_relative(e_comp->layers[above->layer].clients, EINA_INLIST_GET(cw->ec), EINA_INLIST_GET(above->ec));
+ _e_comp_object_layers_update(above->layer, E_COMP_INPUT_INLIST_APPEND_RELATIVE, e_comp->layers[above->layer].clients, cw->ec, above->ec);
+ }
else if (below)
- e_comp->layers[below->layer].clients = eina_inlist_prepend_relative(e_comp->layers[below->layer].clients, EINA_INLIST_GET(cw->ec), EINA_INLIST_GET(below->ec));
+ {
+ e_comp->layers[below->layer].clients = eina_inlist_prepend_relative(e_comp->layers[below->layer].clients, EINA_INLIST_GET(cw->ec), EINA_INLIST_GET(below->ec));
+ _e_comp_object_layers_update(above->layer, E_COMP_INPUT_INLIST_APPEND_RELATIVE, cw->ec, above->ec);
+ }
if ((!above) && (!below))
{
if (prepend)
- e_comp->layers[cw->layer].clients = eina_inlist_prepend(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec));
+ {
+ e_comp->layers[cw->layer].clients = eina_inlist_prepend(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec));
+ _e_comp_object_layers_update(cw->layer, E_COMP_INPUT_INLIST_PREPEND, cw->ec, NULL);
+ }
else //this is either the layer object or a tough actin tinactin^W^W^Wfast stacking client
- e_comp->layers[cw->layer].clients = eina_inlist_append(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec));
+ {
+ e_comp->layers[cw->layer].clients = eina_inlist_append(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec));
+ _e_comp_object_layers_update(cw->layer, E_COMP_INPUT_INLIST_APPEND, cw->ec, NULL);
+ }
}
e_comp->layers[cw->layer].clients_count++;
if (cw->ec && e_comp->layers[cw->layer].clients)
{
e_comp->layers[cw->layer].clients = eina_inlist_remove(e_comp->layers[cw->layer].clients, EINA_INLIST_GET(cw->ec));
+ _e_comp_object_layers_update(cw->layer, E_COMP_INPUT_INLIST_REMOVE, cw->ec, NULL);
e_comp->layers[cw->layer].clients_count--;
}
e_comp_object_signal_emit(cw->smart_obj, "e,state,focused", "e");
else
e_comp_object_signal_emit(cw->smart_obj, "e,state,unfocused", "e");
- if (cw->ec->sticky)
- e_comp_object_signal_emit(cw->smart_obj, "e,state,sticky", "e");
- if (cw->ec->hung)
- e_comp_object_signal_emit(cw->smart_obj, "e,state,hung", "e");
/* visibility must always be enabled for re_manage clients to prevent
* pop-in animations every time the user sees a persistent client again;
* applying visibility for iconic clients prevents the client from getting
cw->set_mouse_callbacks = EINA_FALSE;
}
+static Eina_Bool
+_e_comp_object_color_visible_set(E_Comp_Object *cw, Eina_Bool set)
+{
+ if (cw->color_visible == set) return EINA_TRUE;
+
+ cw->color_visible = set;
+
+ ELOGF("COMP", "color_visible set:%d", cw->ec, set);
+
+ wl_signal_emit(&cw->events.color_visible_set, NULL);
+
+ return EINA_TRUE;
+}
+
+static void
+_e_comp_object_color_visible_update(E_Comp_Object *cw)
+{
+ int a;
+
+ e_comp_object_color_get(cw->smart_obj, NULL, NULL, NULL, &a);
+ if (a <= 0)
+ {
+ _e_comp_object_color_visible_set(cw, EINA_FALSE);
+ return;
+ }
+
+ if (cw->effect_obj)
+ {
+ evas_object_color_get(cw->effect_obj, NULL, NULL, NULL, &a);
+ if (a <= 0)
+ {
+ _e_comp_object_color_visible_set(cw, EINA_FALSE);
+ return;
+ }
+ }
+
+
+ if (cw->shobj)
+ {
+ evas_object_color_get(cw->shobj, NULL, NULL, NULL, &a);
+ if (a <= 0)
+ {
+ _e_comp_object_color_visible_set(cw, EINA_FALSE);
+ return;
+ }
+ }
+
+ if (cw->obj)
+ {
+ evas_object_color_get(cw->obj, NULL, NULL, NULL, &a);
+ if (a <= 0)
+ {
+ _e_comp_object_color_visible_set(cw, EINA_FALSE);
+ return;
+ }
+ }
+
+ _e_comp_object_color_visible_set(cw, EINA_TRUE);
+}
+
+static void
+_e_comp_intercept_effect_obj_color_set(void *data, Evas_Object *obj, int r, int g, int b, int a)
+{
+ E_Comp_Object *cw = data;
+
+ evas_object_color_set(obj, r, g, b, a);
+
+ _e_comp_object_color_visible_update(cw);
+}
+
+static void
+_e_comp_intercept_shobj_color_set(void *data, Evas_Object *obj, int r, int g, int b, int a)
+{
+ E_Comp_Object *cw = data;
+
+ evas_object_color_set(obj, r, g, b, a);
+
+ _e_comp_object_color_visible_update(cw);
+}
+
+static void
+_e_comp_intercept_obj_color_set(void *data, Evas_Object *obj, int r, int g, int b, int a)
+{
+ E_Comp_Object *cw = data;
+
+ evas_object_color_set(obj, r, g, b, a);
+
+ _e_comp_object_color_visible_update(cw);
+}
+
static void
_e_comp_object_setup(E_Comp_Object *cw)
{
evas_object_move(cw->effect_obj, cw->x, cw->y);
evas_object_clip_set(cw->effect_obj, cw->clip);
evas_object_smart_member_add(cw->effect_obj, cw->smart_obj);
+ evas_object_intercept_color_set_callback_add(cw->effect_obj, _e_comp_intercept_effect_obj_color_set, cw);
e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none");
cw->shobj = edje_object_add(e_comp->evas);
evas_object_data_set(cw->shobj, "comp_smart_obj", cw->smart_obj);
edje_object_part_swallow(cw->effect_obj, "e.swallow.content", cw->shobj);
edje_object_signal_callback_add(cw->shobj, "e,action,*,done", "e", _e_comp_object_done_defer, cw);
+ evas_object_intercept_color_set_callback_add(cw->shobj, _e_comp_intercept_shobj_color_set, cw);
/* name objects appropriately for nicer printing when using e_comp_util_wins_print() */
if (cw->ec->override)
e_client_size_set(cw->ec, w, h);
cw->ec->client.w = w - cw->client_inset.l - cw->client_inset.r;
cw->ec->client.h = h - cw->client_inset.t - cw->client_inset.b;
- evas_object_smart_callback_call(obj, "client_resize", NULL);
+ wl_signal_emit(&cw->events.resize, NULL);
}
return;
}
(((w - fw != pw) || (h - fh != ph))))
{
//INF("CALLBACK: REQ(%dx%d) != CUR(%dx%d)", w - fw, h - fh, pw, ph);
- evas_object_smart_callback_call(obj, "client_resize", NULL);
+ wl_signal_emit(&cw->events.resize, NULL);
/* flip for CSD */
if (cw->frame_object || cw->ec->input_only)
e_comp_object_frame_wh_adjust(obj, pw, ph, &w, &h);
}
else
{
- evas_object_smart_callback_call(obj, "client_resize", NULL);
-
/* flip for CSD */
if ((!cw->frame_object) && (!cw->ec->input_only))
w = pw, h = ph;
+
+ wl_signal_emit(&cw->events.resize, NULL);
/* "just do it" for overrides */
evas_object_resize(obj, w, h);
}
layer_set_data.cw = cw;
layer_set_data.layer = layer;
- wl_signal_emit_mutable(&cw->events.set_layer, &layer_set_data);
+ wl_signal_emit(&cw->events.set_layer, &layer_set_data);
if (cw->visible)
{
e_comp_render_queue();
- _e_comp_object_transform_obj_stack_update(obj);
+ e_comp_object_transform_obj_stack_update(obj);
}
#else
/* clamp to valid client layer */
layer = e_comp_canvas_client_layer_map_nearest(layer);
cw->ec->layer = layer;
+ e_client_input_thread_layer_set(cw->ec, layer);
if (e_config->transient.layer)
{
E_Client *child;
#ifdef REFACTOR_DESK_AREA
EINTERN void
-_e_comp_object_raise(Evas_Object *obj)
+e_comp_object_raise(Evas_Object *obj)
#else
static void
_e_comp_object_raise(Evas_Object *obj)
#ifdef REFACTOR_DESK_AREA
EINTERN void
-_e_comp_object_lower(E_Comp_Object *cw, Evas_Object *obj)
+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)
{
_e_comp_object_hook_call(E_COMP_OBJECT_HOOK_RESTACK, ec);
#ifdef REFACTOR_DESK_AREA
- wl_signal_emit_mutable(&cw->events.lower_done, NULL);
+ wl_signal_emit(&cw->events.lower_done, NULL);
#else
- wl_signal_emit_mutable(&cw->events.lower, NULL);
+ wl_signal_emit(&cw->events.lower, NULL);
#endif
}
}
#ifdef REFACTOR_DESK_AREA
EINTERN void
-_e_comp_object_stack_above(Evas_Object *obj, Evas_Object *target)
+e_comp_object_stack_above(Evas_Object *obj, Evas_Object *target)
#else
static void
_e_comp_object_stack_above(Evas_Object *obj, Evas_Object *target)
#ifdef REFACTOR_DESK_AREA
EINTERN void
-_e_comp_object_stack_below(Evas_Object *obj, Evas_Object *target)
+e_comp_object_stack_below(Evas_Object *obj, Evas_Object *target)
#else
static void
_e_comp_object_stack_below(Evas_Object *obj, Evas_Object *target)
E_Client *ecstack;
short layer;
Evas_Object *o = stack;
+#ifdef REFACTOR_DESK_AREA
+ Eina_Bool raising = stack_cb == e_comp_object_stack_above;
+#else
Eina_Bool raising = stack_cb == _e_comp_object_stack_above;
+#endif
/* We should consider topmost's layer_pending for subsurface */
if ((cw->ec->layer_block) || _e_comp_object_is_pending(cw->ec))
stack_above_data.cw = cw;
stack_above_data.above_obj = above;
- wl_signal_emit_mutable(&cw->events.stack_above, &stack_above_data);
+ wl_signal_emit(&cw->events.stack_above, &stack_above_data);
#else
if (evas_object_below_get(obj) == above)
{
stack_below_data.cw = cw;
stack_below_data.below_obj = below;
- wl_signal_emit_mutable(&cw->events.stack_below, &stack_below_data);
+ wl_signal_emit(&cw->events.stack_below, &stack_below_data);
if (!cw->visible)
e_comp_render_queue();
TRACE_DS_BEGIN(COMP:INTERCEPT LOWER);
#ifdef REFACTOR_DESK_AREA
- wl_signal_emit_mutable(&cw->events.lower, cw);
+ wl_signal_emit(&cw->events.lower, cw);
#else
if ((cw->ec->layer_block) || (cw->ec->layer_pending))
{
if (cw->ec->layer_pending)
e_comp_object_layer_update(obj, NULL, obj);
+#ifdef REFACTOR_DESK_AREA
+ e_comp_object_lower(cw, obj);
+#else
_e_comp_object_lower(cw, obj);
+#endif
goto end;
}
if (!EINA_INLIST_GET(cw->ec)->prev) goto end; //already lowest on layer
_e_comp_object_layers_add(cw, NULL, NULL, 1);
if (evas_object_layer_get(o) != evas_object_layer_get(obj)) goto end; //already at bottom!
evas_object_data_set(obj, "client_restack", (void*)1);
+#ifdef REFACTOR_DESK_AREA
+ e_comp_object_lower(cw, obj);
+#else
_e_comp_object_lower(cw, obj);
+#endif
evas_object_data_del(obj, "client_restack");
if (!cw->visible) goto end;
e_comp_render_queue();
+#ifdef REFACTOR_DESK_AREA
+ e_comp_object_transform_obj_stack_update(obj);
+#else
_e_comp_object_transform_obj_stack_update(obj);
+#endif
end:
#endif
TRACE_DS_BEGIN(COMP:INTERCEPT RAISE);
#ifdef REFACTOR_DESK_AREA
- wl_signal_emit_mutable(&cw->events.raise, cw);
+ wl_signal_emit(&cw->events.raise, cw);
#else
if ((cw->ec->layer_block) || (cw->ec->layer_pending))
{
if (cw->ec->layer != obj_layer)
e_comp_object_layer_update(obj, NULL, NULL);
}
-
+#ifdef REFACTOR_DESK_AREA
+ e_comp_object_raise(obj);
+#else
_e_comp_object_raise(obj);
+#endif
goto end;
}
if (!EINA_INLIST_GET(cw->ec)->next) goto end;//already highest on layer
if (ec && (!ec->override)) break;
}
}
+#ifdef REFACTOR_DESK_AREA
+ e_comp_object_stack_below(obj, op);
+#else
_e_comp_object_stack_below(obj, op);
+#endif
e_client_focus_defer_set(cw->ec);
if (!cw->visible) goto end;
e_comp_render_queue();
+#ifdef REFACTOR_DESK_AREA
+ e_comp_object_transform_obj_stack_update(obj);
+#else
_e_comp_object_transform_obj_stack_update(obj);
+#endif
end:
#endif
{
ELOGF("COMP", "Hide. Cancel launching flag", cw->ec);
cw->ec->launching = EINA_FALSE;
+ e_comp_object_signal_emit(cw->ec->frame, "e,action,launch,cancel", "e");
}
if (cw->ec->hidden)
ELOGF("COMP", "Hide hidden evas_object:%p", cw->ec, obj);
evas_object_hide(obj);
- wl_signal_emit_mutable(&cw->events.hide, NULL);
+ wl_signal_emit(&cw->events.hide, NULL);
return;
}
ELOGF("COMP", "Hide input_only evas_object:%p", cw->ec, obj);
evas_object_hide(obj);
- wl_signal_emit_mutable(&cw->events.hide, NULL);
+ wl_signal_emit(&cw->events.hide, NULL);
return;
}
ELOGF("COMP", "Hide normal object:%p", cw->ec, obj);
evas_object_hide(obj);
- wl_signal_emit_mutable(&cw->events.hide, NULL);
+ wl_signal_emit(&cw->events.hide, NULL);
}
static void
cw->visible, cw->animating, cw->defer_hide, cw->content_type, cw->updates, cw->w, cw->h,
ec->iconic, ec->exp_iconify.by_client, ec->exp_iconify.type, ec->input_only, ec->ignored, ec->new_client);
- if (ec->sticky)
- e_comp_object_signal_emit(cw->smart_obj, "e,state,sticky", "e");
if (cw->visible)
{
if (ec->iconic && cw->animating)
}
}
- wl_signal_emit_mutable(&cw->events.show, NULL);
+ wl_signal_emit(&cw->events.show, NULL);
}
static void
evas_object_image_smooth_scale_set(cw->obj, e_comp_config_get()->smooth_windows);
evas_object_name_set(cw->obj, "cw->obj");
evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888);
+ evas_object_intercept_color_set_callback_add(cw->obj, _e_comp_intercept_obj_color_set, cw);
}
_e_comp_object_alpha_set(cw);
if (focus)
{
+ /* check for modal child and set focus to modal child */
+ E_Client *modal_child = e_client_modal_child_get(ec);
+ if ((modal_child) && (modal_child != ec) &&
+ (!e_client_is_iconified_by_client(modal_child)) &&
+ (modal_child->visible) && (!e_object_is_del(E_OBJECT(modal_child))))
+ {
+ // add ec to latest focus stack
+ e_client_focus_latest_set(ec);
+
+ ELOGF("FOCUS", "FOCUS SET to MODAL (ec:%p, win:0x%08zx, frame:%p)", ec, modal_child, e_client_util_win_get(modal_child), modal_child->frame);
+ //e_client_focused_set(modal_child);
+ evas_object_focus_set(modal_child->frame, focus);
+ return;
+ }
if (!cw->visible)
{
/* not yet visible, wait till the next time... */
{
evas_object_color_set(obj, r, g, b, a);
}
+
+ wl_signal_emit(&cw->events.color_set, NULL);
+
+ _e_comp_object_color_visible_update(cw);
}
+
////////////////////////////////////////////////////
static void
}
static void
-_e_comp_smart_cb_sticky(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- e_comp_object_signal_emit(obj, "e,state,sticky", "e");
-}
-
-static void
-_e_comp_smart_cb_unsticky(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- e_comp_object_signal_emit(obj, "e,state,unsticky", "e");
-}
-
-static void
-_e_comp_smart_cb_unhung(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
- E_Comp_Object *cw = data;
-
- if (!cw->ec) return; //NYI
- e_comp_object_signal_emit(cw->smart_obj, "e,state,unhung", "e");
-}
-
-static void
-_e_comp_smart_cb_hung(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
- E_Comp_Object *cw = data;
-
- if (!cw->ec) return; //NYI
- e_comp_object_signal_emit(cw->smart_obj, "e,state,hung", "e");
-}
-
-static void
_e_comp_smart_focus_in(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
e_comp_object_signal_emit(obj, "e,state,focused", "e");
wl_signal_init(&cw->events.stack_above);
wl_signal_init(&cw->events.stack_below);
#endif
+ wl_signal_init(&cw->events.image_filter_set);
+ wl_signal_init(&cw->events.render_op_set);
+ wl_signal_init(&cw->events.content_type_set);
+ wl_signal_init(&cw->events.color_set);
+ wl_signal_init(&cw->events.color_visible_set);
+ wl_signal_init(&cw->events.resize);
cw->smart_obj = obj;
cw->x = cw->y = cw->w = cw->h = -1;
cw->transform_bg_color.g = 0;
cw->transform_bg_color.b = 0;
cw->transform_bg_color.a = 255;
+ cw->color_visible = EINA_TRUE;
evas_object_data_set(obj, "comp_obj", cw);
evas_object_move(obj, -1, -1);
/* intercept ALL the callbacks! */
evas_object_smart_callback_add(obj, "unmaximize", _e_comp_smart_cb_unmaximize, cw);
evas_object_smart_callback_add(obj, "unfullscreen", _e_comp_smart_cb_unfullscreen, cw);
- evas_object_smart_callback_add(obj, "stick", _e_comp_smart_cb_sticky, cw);
- evas_object_smart_callback_add(obj, "unstick", _e_comp_smart_cb_unsticky, cw);
-
- evas_object_smart_callback_add(obj, "hung", _e_comp_smart_cb_hung, cw);
- evas_object_smart_callback_add(obj, "unhung", _e_comp_smart_cb_unhung, cw);
-
evas_object_smart_callback_add(obj, "frame_recalc", _e_comp_smart_cb_frame_recalc, cw);
evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_IN, _e_comp_smart_focus_in, cw);
{
INTERNAL_ENTRY;
evas_object_color_set(cw->clip, r, g, b, a);
- evas_object_smart_callback_call(obj, "color_set", NULL);
}
}
EINTERN Eina_Bool
-e_comp_object_frame_title_set(Evas_Object *obj, const char *name)
-{
- API_ENTRY EINA_FALSE;
- if (!e_util_strcmp(cw->frame_name, name)) return EINA_FALSE;
- eina_stringshare_replace(&cw->frame_name, name);
- if (cw->frame_object)
- edje_object_part_text_set(cw->frame_object, "e.text.title", cw->frame_name);
- return EINA_TRUE;
-}
-
-EINTERN Eina_Bool
e_comp_object_frame_exists(Evas_Object *obj)
{
API_ENTRY EINA_FALSE;
if (set)
{
evas_object_color_get(obj, &r, &g, &b, &a);
- evas_object_color_set(obj, 0, 0, 0, 0);
cw->transparent.user_r = r;
cw->transparent.user_g = g;
cw->transparent.user_b = b;
cw->transparent.user_a = a;
+ cw->transparent.setting = EINA_TRUE;
+ evas_object_color_set(obj, 0, 0, 0, 0);
+ cw->transparent.setting = EINA_FALSE;
+
ELOGF("COMP", "Transparent enabled user_color(%d,%d,%d,%d)",
cw->ec,
cw->transparent.user_r,
cw->transform_bg_obj = o;
evas_object_name_set(cw->transform_bg_obj, "cw->transform_bg_obj");
}
+#ifdef REFACTOR_DESK_AREA
+ e_comp_object_transform_obj_stack_update(obj);
+#else
_e_comp_object_transform_obj_stack_update(obj);
+#endif
}
else
{
ELOGF("TRANSFORM","transform set: TRUE", cw->ec);
evas_object_name_set(cw->transform_tranp_obj, "cw->transform_trasp_obj");
}
+#ifdef REFACTOR_DESK_AREA
+ e_comp_object_transform_obj_stack_update(obj);
+#else
_e_comp_object_transform_obj_stack_update(obj);
+#endif
}
else
{
if (cw->shobj)
_e_comp_object_shadow_setup(cw);
+ wl_signal_emit(&cw->events.content_type_set, NULL);
+
return EINA_TRUE;
}
evas_object_image_smooth_scale_set(cw->obj, e_comp_config_get()->smooth_windows);
evas_object_name_set(cw->obj, "cw->obj");
evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888);
+ evas_object_intercept_color_set_callback_add(obj, _e_comp_intercept_obj_color_set, cw);
_e_comp_object_alpha_set(cw);
if (cw->shobj)
e_comp_object_render(cw->smart_obj);
e_comp_object_render_update_add(obj);
+ wl_signal_emit(&cw->events.content_type_set, NULL);
+
return EINA_TRUE;
}
if (e_object_is_del(E_OBJECT(cw->ec))) return EINA_FALSE;
if (!e_client_cdata_get(cw->ec)) return EINA_FALSE;
+ if (cw->image_filter == filter) return EINA_TRUE;
+
switch (filter)
{
case E_COMP_IMAGE_FILTER_BLUR:
cw->image_filter = filter;
+ wl_signal_emit(&cw->events.image_filter_set, NULL);
+
return EINA_TRUE;
}
e_comp_object_color_visible_get(Evas_Object *obj)
{
API_ENTRY EINA_FALSE;
- int a;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, EINA_FALSE);
-
- e_comp_object_color_get(obj, NULL, NULL, NULL, &a);
- if (a <= 0)
- return EINA_FALSE;
- evas_object_color_get(cw->effect_obj, NULL, NULL, NULL, &a);
- if (a <= 0)
- return EINA_FALSE;
-
- evas_object_color_get(cw->shobj, NULL, NULL, NULL, &a);
- if (a <= 0)
- return EINA_FALSE;
-
- evas_object_color_get(cw->obj, NULL, NULL, NULL, &a);
- if (a <= 0)
- return EINA_FALSE;
-
- return EINA_TRUE;
+ return cw->color_visible;
}
E_API Eina_Bool
else
e_comp_object_render_update_add(obj);
+ _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_RENDER_UPDATE_LOCK_UNSET, cw->ec);
+
ELOGF("COMP", "Render update lock disabled", cw->ec);
}
}
{
API_ENTRY;
- if (cw->transparent.set)
+ if ((cw->transparent.set) || (cw->transparent.setting))
{
if (r) *r = cw->transparent.user_r;
if (g) *g = cw->transparent.user_g;
API_ENTRY;
evas_object_render_op_set(cw->obj, op);
+
+ wl_signal_emit(&cw->events.render_op_set, NULL);
}
EINTERN Evas_Render_Op
wl_signal_add(&cw->events.stack_below, listener);
}
#endif
+
+EINTERN void
+e_comp_object_image_filter_set_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.image_filter_set, listener);
+}
+
+EINTERN void
+e_comp_object_render_op_set_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.render_op_set, listener);
+}
+
+EINTERN void
+e_comp_object_content_type_set_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.content_type_set, listener);
+}
+
+EINTERN void
+e_comp_object_color_set_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.color_set, listener);
+}
+
+EINTERN void
+e_comp_object_color_visible_set_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.color_visible_set, listener);
+}
+
+EINTERN void
+e_comp_object_resize_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.resize, listener);
+}