From 26bea02a53d48624f196347bdd8532c8ff39a561 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 11 Apr 2024 12:36:18 +0900 Subject: [PATCH] e_comp_object: remove cw->frame_object e20 does not support SSD(Server Side Decoration). So this is uselesss. Change-Id: If13d1f96f8be71905f4e5464738fa0351ae03903 --- src/bin/e_comp_object.c | 174 ++++++++--------------------------------- src/bin/e_comp_object_intern.h | 1 - 2 files changed, 34 insertions(+), 141 deletions(-) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index b01fe36..9c323e5 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -585,12 +585,6 @@ _e_comp_object_alpha_set(E_Comp_Object *cw) static void _e_comp_object_shadow(E_Comp_Object *cw) { - if (e_client_util_shadow_state_get(cw->ec)) - edje_object_signal_emit(cw->frame_object ?: cw->shobj, "e,state,shadow,on", "e"); - else - edje_object_signal_emit(cw->frame_object ?: cw->shobj, "e,state,shadow,off", "e"); - if (cw->frame_object) - edje_object_signal_emit(cw->shobj, "e,state,shadow,off", "e"); evas_object_smart_callback_call(cw->smart_obj, "shadow_change", cw->ec); } @@ -1074,20 +1068,9 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw) else e_comp_object_signal_emit(cw->smart_obj, "e,state,hidden", "e"); - /* breaks animation counter */ - if (cw->frame_object) - { - edje_object_part_swallow(cw->frame_object, "e.swallow.client", cw->obj); - edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->frame_object); - edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->frame_object); - edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->frame_object); - no_shadow = 1; - } - else - { - no_shadow = 1; - edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->obj); - } + no_shadow = 1; + edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->obj); + if (cw->input_obj) { input_rect_sd = evas_object_smart_data_get(cw->input_obj); @@ -1429,7 +1412,7 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj EINA_UNUSED) bxx = pw - (bx + bxx), byy = ph - (by + byy); evas_object_image_border_set(cw->obj, bx, bxx, by, byy); } - else if (cw->client_inset.calc && (!cw->frame_object)) //CSD + else if (cw->client_inset.calc) //CSD { bx = -cw->client_inset.l + 4, by = -cw->client_inset.t + 4; bxx = -cw->client_inset.r, byy = -cw->client_inset.b; @@ -1549,8 +1532,8 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) * this means that ec->client matches cw->x/y, the opposite * of SSD. */ - fx = (!cw->frame_object) * cw->client_inset.l; - fy = (!cw->frame_object) * cw->client_inset.t; + fx = cw->client_inset.l; + fy = cw->client_inset.t; if ((cw->x == x + fx) && (cw->y == y + fy)) { if ((cw->ec->x != x) || (cw->ec->y != y)) @@ -1616,9 +1599,7 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) cw->ec->client.x = ix; cw->ec->client.y = iy; - /* flip SSD->CSD */ - if (!cw->frame_object) - x = ix, y = iy; + x = ix, y = iy; evas_object_move(obj, x, y); } } @@ -1649,8 +1630,8 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) * this means that ec->client matches cw->w/h, the opposite * of SSD. */ - fw = (!cw->frame_object) * (-cw->client_inset.l - cw->client_inset.r); - fh = (!cw->frame_object) * (-cw->client_inset.t - cw->client_inset.b); + fw = -cw->client_inset.l - cw->client_inset.r; + fh = -cw->client_inset.t - cw->client_inset.b; if ((cw->w == w + fw) && (cw->h == h + fh)) { if (((cw->ec->w != w) || (cw->ec->h != h)) || @@ -1757,7 +1738,7 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) //INF("CALLBACK: REQ(%dx%d) != CUR(%dx%d)", w - fw, h - fh, pw, ph); wl_signal_emit(&cw->events.resize, NULL); /* flip for CSD */ - if (cw->frame_object || cw->ec->input_only) + if (cw->ec->input_only) e_comp_object_frame_wh_adjust(obj, pw, ph, &w, &h); else w = pw, h = ph; @@ -1772,7 +1753,7 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) else { /* flip for CSD */ - if ((!cw->frame_object) && (!cw->ec->input_only)) + if (!cw->ec->input_only) w = pw, h = ph; wl_signal_emit(&cw->events.resize, NULL); @@ -1790,10 +1771,9 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) * which also changes the client's position */ cw->force_move = 1; - if (cw->frame_object) - x = cw->x, y = cw->y; - else - x = cw->ec->x, y = cw->ec->y; + + x = cw->ec->x, y = cw->ec->y; + switch (cw->ec->resize_mode) { case E_POINTER_RESIZE_BL: @@ -2721,8 +2701,8 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED) if (input_rect_data->obj) { evas_object_geometry_set(input_rect_data->obj, - cw->x + input_rect_data->rect.x + (!!cw->frame_object * cw->client_inset.l), - cw->y + input_rect_data->rect.y + (!!cw->frame_object * cw->client_inset.t), + cw->x + input_rect_data->rect.x, + cw->y + input_rect_data->rect.y, input_rect_data->rect.w, input_rect_data->rect.h); } } @@ -2864,54 +2844,12 @@ _e_comp_intercept_color_set(void *data, Evas_Object *obj, int r, int g, int b, i static void _e_comp_object_frame_recalc(E_Comp_Object *cw) { - int w, h, ox, oy, ow, oh; - Eina_List *l; - Eina_Bool pass_event_flag = EINA_FALSE; - E_Input_Rect_Data *input_rect_data; - E_Input_Rect_Smart_Data *input_rect_sd; + cw->client_inset.l = 0; + cw->client_inset.r = 0; + cw->client_inset.t = 0; + cw->client_inset.b = 0; - if (cw->frame_object) - { - if (cw->obj) edje_object_part_unswallow(cw->frame_object, cw->obj); - evas_object_geometry_get(cw->frame_object, NULL, NULL, &w, &h); - /* set a fixed size, force edje calc, check size difference */ - evas_object_resize(cw->frame_object, MAX(w, 50), MAX(h, 50)); - edje_object_message_signal_process(cw->frame_object); - edje_object_calc_force(cw->frame_object); - edje_object_part_geometry_get(cw->frame_object, "e.swallow.client", &ox, &oy, &ow, &oh); - cw->client_inset.l = ox; - cw->client_inset.r = MAX(w, 50) - (ox + ow); - cw->client_inset.t = oy; - cw->client_inset.b = MAX(h, 50) - (oy + oh); - if (cw->obj) edje_object_part_swallow(cw->frame_object, "e.swallow.client", cw->obj); - evas_object_resize(cw->frame_object, w, h); - - if (cw->input_obj) - { - input_rect_sd = evas_object_smart_data_get(cw->input_obj); - if (input_rect_sd) - { - EINA_LIST_FOREACH(input_rect_sd->input_rect_data_list, l, input_rect_data) - { - if (input_rect_data->obj) - { - pass_event_flag = EINA_TRUE; - break; - } - } - } - } - evas_object_pass_events_set(cw->default_input_obj, pass_event_flag); - evas_object_pass_events_set(cw->obj, pass_event_flag); - } - else - { - cw->client_inset.l = 0; - cw->client_inset.r = 0; - cw->client_inset.t = 0; - cw->client_inset.b = 0; - } - cw->client_inset.calc = !!cw->frame_object; + cw->client_inset.calc = 0; } static void @@ -2957,13 +2895,6 @@ _e_comp_smart_cb_maximize(void *data, Evas_Object *obj EINA_UNUSED, void *event_ E_Comp_Object *cw = data; _e_comp_object_shadow_setup(cw); - if (cw->frame_object) - { - _e_comp_object_shadow(cw); - e_comp_object_signal_emit(cw->smart_obj, "e,action,maximize", "e"); - _e_comp_object_frame_recalc(cw); - evas_object_smart_callback_call(cw->smart_obj, "frame_recalc_done", &cw->client_inset); - } } static void @@ -2973,27 +2904,12 @@ _e_comp_smart_cb_fullscreen(void *data, Evas_Object *obj EINA_UNUSED, void *even if (_e_comp_object_shadow_setup(cw)) e_comp_object_damage(cw->smart_obj, 0, 0, cw->ec->w, cw->ec->h); - if (cw->frame_object) - { - _e_comp_object_shadow(cw); - e_comp_object_signal_emit(cw->smart_obj, "e,action,maximize,fullscreen", "e"); - _e_comp_object_frame_recalc(cw); - evas_object_smart_callback_call(cw->smart_obj, "frame_recalc_done", &cw->client_inset); - } } static void _e_comp_smart_cb_unmaximize(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { - E_Comp_Object *cw = data; - if (cw->frame_object) - { - _e_comp_object_shadow(cw); - e_comp_object_signal_emit(obj, "e,action,unmaximize", "e"); - _e_comp_object_frame_recalc(cw); - evas_object_smart_callback_call(cw->smart_obj, "frame_recalc_done", &cw->client_inset); - } } static void @@ -3006,13 +2922,6 @@ _e_comp_smart_cb_unfullscreen(void *data, Evas_Object *obj, void *event_info EIN EC_CHANGED(cw->ec); cw->ec->changes.size = 1; } - if (cw->frame_object) - { - _e_comp_object_shadow(cw); - e_comp_object_signal_emit(obj, "e,action,unmaximize,unfullscreen", "e"); - _e_comp_object_frame_recalc(cw); - evas_object_smart_callback_call(cw->smart_obj, "frame_recalc_done", &cw->client_inset); - } } static void @@ -3067,19 +2976,17 @@ _e_comp_input_obj_smart_move(Evas_Object *obj, int x, int y) E_Input_Rect_Smart_Data *input_rect_sd; E_Input_Rect_Data *input_rect_data; Eina_List *l; - E_Comp_Object *cw; input_rect_sd = evas_object_smart_data_get(obj); if (!input_rect_sd) return; - cw = input_rect_sd->cw; EINA_LIST_FOREACH(input_rect_sd->input_rect_data_list, l, input_rect_data) { if (input_rect_data->obj) { evas_object_geometry_set(input_rect_data->obj, - x + input_rect_data->rect.x + (!!cw->frame_object * cw->client_inset.l), - y + input_rect_data->rect.y + (!!cw->frame_object * cw->client_inset.t), + x + input_rect_data->rect.x, + y + input_rect_data->rect.y, input_rect_data->rect.w, input_rect_data->rect.h); } } @@ -3102,8 +3009,8 @@ _e_comp_input_obj_smart_resize(Evas_Object *obj, int w, int h) if (input_rect_data->obj) { evas_object_geometry_set(input_rect_data->obj, - cw->x + input_rect_data->rect.x + (!!cw->frame_object * cw->client_inset.l), - cw->y + input_rect_data->rect.y + (!!cw->frame_object * cw->client_inset.t), + cw->x + input_rect_data->rect.x, + cw->y + input_rect_data->rect.y, input_rect_data->rect.w, input_rect_data->rect.h); } } @@ -3300,8 +3207,6 @@ _e_comp_smart_hide(Evas_Object *obj) edje_object_freeze(cw->effect_obj); edje_object_freeze(cw->shobj); edje_object_play_set(cw->shobj, 0); - if (cw->frame_object) - edje_object_play_set(cw->frame_object, 0); } e_comp_render_queue(); //force nocomp recheck @@ -3335,8 +3240,6 @@ _e_comp_smart_show(Evas_Object *obj) edje_object_thaw(cw->effect_obj); edje_object_thaw(cw->shobj); edje_object_play_set(cw->shobj, 1); - if (cw->frame_object) - edje_object_play_set(cw->frame_object, 1); } evas_object_show(cw->effect_obj); if (cw->mask.obj) evas_object_show(cw->mask.obj); @@ -3439,7 +3342,6 @@ _e_comp_smart_del(Evas_Object *obj) evas_object_del(cw->obj); evas_object_del(cw->shobj); evas_object_del(cw->effect_obj); - evas_object_del(cw->frame_object); evas_object_del(cw->input_obj); evas_object_del(cw->mask.obj); if (cw->dim.mask_obj) evas_object_del(cw->dim.mask_obj); @@ -3494,10 +3396,8 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h) int ww, hh, pw, ph; - if (cw->frame_object) - e_comp_object_frame_wh_unadjust(obj, w, h, &ww, &hh); - else - ww = w, hh = h; + ww = w, hh = h; + /* verify pixmap:object size */ if (e_pixmap_size_get(cw->ec->pixmap, &pw, &ph) && (!cw->ec->override)) { @@ -3936,9 +3836,7 @@ EINTERN void e_comp_object_frame_extends_get(Evas_Object *obj, int *x, int *y, int *w, int *h) { API_ENTRY; - if (cw->frame_extends) - edje_object_parts_extends_calc(cw->frame_object, x, y, w, h); - else + if (!cw->frame_extends) { if (x) *x = 0; if (y) *y = 0; @@ -4107,8 +4005,8 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h) evas_object_clip_set(input_rect_data->obj, cw->clip); evas_object_smart_member_add(input_rect_data->obj, cw->input_obj); evas_object_geometry_set(input_rect_data->obj, - cw->ec->client.x + (!!cw->frame_object * cw->client_inset.l) + x, - cw->ec->client.y + (!!cw->frame_object * cw->client_inset.t) + y, w, h); + cw->ec->client.x + x, + cw->ec->client.y + y, w, h); evas_object_pass_events_set(cw->default_input_obj, 1); evas_object_pass_events_set(cw->obj, 1); if (cw->visible) @@ -4164,8 +4062,6 @@ e_comp_object_frame_geometry_set(Evas_Object *obj, int l, int r, int t, int b) int tx, ty, tw, th; API_ENTRY; - if (cw->frame_object) - CRI("ACK! ec:%p", cw->ec); if ((cw->client_inset.l == l) && (cw->client_inset.r == r) && (cw->client_inset.t == t) && (cw->client_inset.b == b)) return; calc = cw->client_inset.calc; @@ -4203,14 +4099,14 @@ EINTERN Eina_Bool e_comp_object_frame_allowed(Evas_Object *obj) { API_ENTRY EINA_FALSE; - return (cw->frame_object || (!cw->client_inset.calc)); + return (!cw->client_inset.calc); } EINTERN Eina_Bool e_comp_object_frame_exists(Evas_Object *obj) { API_ENTRY EINA_FALSE; - return !!cw->frame_object; + return EINA_FALSE; } EINTERN Eina_Bool @@ -4232,7 +4128,7 @@ e_comp_object_signal_emit(Evas_Object *obj, const char *sig, const char *src) API_ENTRY; //INF("EMIT %p: %s %s", cw->ec, sig, src); edje_object_signal_emit(cw->shobj, sig, src); - if (cw->frame_object) edje_object_signal_emit(cw->frame_object, sig, src); + if ((cw->ec->override && e_comp_config_get()->match.disable_overrides) || ((!cw->ec->override) && e_comp_config_get()->match.disable_borders)) return; @@ -5794,9 +5690,7 @@ e_comp_object_content_unset(Evas_Object *obj) if (cw->obj) { - if (cw->frame_object) - edje_object_part_unswallow(cw->frame_object, cw->obj); - else if (cw->shobj) + if (cw->shobj) edje_object_part_unswallow(cw->shobj, cw->obj); evas_object_del(cw->obj); diff --git a/src/bin/e_comp_object_intern.h b/src/bin/e_comp_object_intern.h index be895f4..7e44aa5 100644 --- a/src/bin/e_comp_object_intern.h +++ b/src/bin/e_comp_object_intern.h @@ -37,7 +37,6 @@ struct _E_Comp_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 -- 2.7.4