From 85e807798252cb4873d1d1b2c8e2217992b8f74f Mon Sep 17 00:00:00 2001 From: Doyoun Kang Date: Wed, 10 Jan 2024 17:26:00 +0900 Subject: [PATCH] remove code related with ec->shaded Change-Id: Ie195b353c8be29d414cacfd42506e49c16196fbb --- src/bin/e_client.c | 29 +++++++---------------------- src/bin/e_client.h | 1 - src/bin/e_comp_object.c | 28 +++++++--------------------- src/bin/e_comp_wl.c | 2 +- src/bin/e_desk.c | 4 ++-- 5 files changed, 17 insertions(+), 47 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 52bee9e..42eac52 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -2011,20 +2011,6 @@ _e_client_cb_evas_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN } static void -_e_client_cb_evas_shade_done(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) -{ - E_Client *ec = data; - - if (e_object_is_del(data)) return; - - ec->shading = 0; - ec->shaded = !(ec->shaded); - ec->changes.shaded = 1; - ec->changes.shading = 1; - e_client_comp_hidden_set(ec, ec->shaded); -} - -static void _e_client_cb_evas_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { E_Client *ec = data; @@ -2279,7 +2265,7 @@ _e_client_eval(E_Client *ec) if (ec->changes.size) { ec->changes.size = 0; - if ((!ec->shaded) && (!ec->shading)) + if ((!ec->shading)) evas_object_resize(ec->frame, ec->w, ec->h); prop |= E_CLIENT_PROPERTY_SIZE; @@ -3334,7 +3320,6 @@ e_client_new(E_Pixmap *cp, int first_map, int internal) evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOVE, _e_client_cb_evas_move, ec); evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESIZE, _e_client_cb_evas_resize, ec); evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESTACK, _e_client_cb_evas_restack, ec); - evas_object_smart_callback_add(ec->frame, "shade_done", _e_client_cb_evas_shade_done, ec); } wl_signal_emit_mutable(&PRI(ec)->events.new_client_post, NULL); @@ -4274,7 +4259,7 @@ e_client_maximize(E_Client *ec, E_Maximize max) if (!(max & E_MAXIMIZE_DIRECTION)) max |= E_MAXIMIZE_BOTH; - if ((ec->shaded) || (ec->shading)) return; + if ((ec->shading)) return; if ((ec->maximized & E_MAXIMIZE_DIRECTION) == (max & E_MAXIMIZE_DIRECTION)) { @@ -4328,7 +4313,7 @@ e_client_unmaximize(E_Client *ec, E_Maximize max) return; } - if ((ec->shaded) || (ec->shading)) return; + if ((ec->shading)) return; /* Remove directions not used */ max &= (ec->maximized & E_MAXIMIZE_DIRECTION); @@ -4355,7 +4340,7 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy) E_OBJECT_CHECK(ec); E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE); - if ((ec->shaded) || (ec->shading) || (ec->fullscreen)) return; + if ((ec->shading) || (ec->fullscreen)) return; // call the fullscreen_pre hook of a client wl_signal_emit_mutable(&PRI(ec)->events.fullscreen_pre, NULL); @@ -4389,7 +4374,7 @@ e_client_unfullscreen(E_Client *ec) ec->need_fullscreen = 0; - if ((ec->shaded) || (ec->shading)) return; + if ((ec->shading)) return; if (!ec->fullscreen) return; ec->fullscreen = 0; @@ -4721,7 +4706,7 @@ e_client_act_resize_begin(E_Client *ec, E_Binding_Event_Mouse_Button *ev, E_Poin { E_OBJECT_CHECK(ec); E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE); - if (ec->lock_user_size || ec->shaded || ec->shading) return; + if (ec->lock_user_size || ec->shading) return; if (e_client_util_resizing_get(ec) || (ec->moving)) return; if (ev) { @@ -4894,7 +4879,7 @@ e_client_resize_cancel(void) EINTERN Eina_Bool e_client_resize_begin(E_Client *ec) { - if ((ec->shaded) || (ec->shading) || + if ((ec->shading) || (ec->fullscreen) || (ec->lock_user_size)) goto error; if (!_e_client_action_input_win_new()) goto error; diff --git a/src/bin/e_client.h b/src/bin/e_client.h index 16b514e..66e0e0e 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -753,7 +753,6 @@ struct E_Client unsigned int re_manage : 1; // client is persisting from before E restart unsigned int placed : 1; unsigned int shading : 1; - unsigned int shaded : 1; unsigned int iconic : 1; unsigned int deskshow : 1; unsigned int sticky : 1; diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 8d3f008..dd7f2ec 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -1137,8 +1137,6 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw) e_comp_object_signal_emit(cw->smart_obj, "e,state,urgent", "e"); else e_comp_object_signal_emit(cw->smart_obj, "e,state,not_urgent", "e"); - if (cw->ec->shaded) - e_comp_object_signal_emit(cw->smart_obj, "e,state,shaded", "e"); if (cw->ec->sticky) e_comp_object_signal_emit(cw->smart_obj, "e,state,sticky", "e"); if (cw->ec->hung) @@ -1583,7 +1581,7 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) /* prevent moving at all if move isn't allowed in current maximize state */ if ((!e_config->allow_manip) && ((cw->ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)) return; /* queue unmaximize if we are allowing move and update unmaximize geometry */ - if ((!cw->ec->shading) && (!cw->ec->shaded)) + if ((!cw->ec->shading)) { E_Zone *zone; zone = e_comp_zone_find_by_ec(cw->ec); @@ -1662,7 +1660,7 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) fh = (!cw->frame_object) * (-cw->client_inset.t - cw->client_inset.b); if ((cw->w == w + fw) && (cw->h == h + fh)) { - if (cw->ec->shading || cw->ec->shaded) return; + if (cw->ec->shading) return; if (((cw->ec->w != w) || (cw->ec->h != 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)) @@ -1690,7 +1688,7 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) { /* prevent resizing while maximized depending on direction and config */ if ((!e_config->allow_manip) && ((cw->ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)) return; - if ((!cw->ec->shading) && (!cw->ec->shaded)) + if ((!cw->ec->shading)) { Eina_Bool reject = EINA_FALSE; if (cw->ec->maximized & E_MAXIMIZE_VERTICAL) @@ -1743,7 +1741,7 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) } e_client_size_set(cw->ec, w, h); - if ((!cw->ec->shading) && (!cw->ec->shaded)) + if ((!cw->ec->shading)) { /* client geom never changes when shading since the client is never altered */ cw->ec->client.w = iw; @@ -1773,7 +1771,7 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h) prev_w = cw->w, prev_h = cw->h; e_comp_object_frame_wh_adjust(obj, 0, 0, &fw, &fh); /* check shading and clamp to pixmap size for regular clients */ - if ((!cw->ec->shading) && (!cw->ec->shaded) && (!cw->ec->input_only) && (!cw->ec->override) && + if ((!cw->ec->shading) && (!cw->ec->input_only) && (!cw->ec->override) && (((w - fw != pw) || (h - fh != ph)))) { //INF("CALLBACK: REQ(%dx%d) != CUR(%dx%d)", w - fw, h - fh, pw, ph); @@ -2813,7 +2811,7 @@ _e_comp_smart_cb_frame_recalc(void *data, Evas_Object *obj, void *event_info EIN e_comp_object_frame_wh_adjust(obj, cw->ec->client.w, cw->ec->client.h, &w, &h); evas_object_smart_callback_call(cw->smart_obj, "frame_recalc_done", &cw->client_inset); - if (cw->ec->shading || cw->ec->shaded) return; + if (cw->ec->shading) return; if (cw->ec->fullscreen) { zone = e_comp_zone_find_by_ec(cw->ec); @@ -2844,17 +2842,6 @@ _e_comp_smart_cb_shading(void *data, Evas_Object *obj EINA_UNUSED, void *event_i } static void -_e_comp_smart_cb_shaded(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) -{ - E_Comp_Object *cw = data; - - if (!cw->ec) return; //NYI - E_FREE_FUNC(cw->shade.anim, ecore_timer_del); - - e_comp_object_signal_emit(cw->smart_obj, "e,state,shaded", "e"); -} - -static void _e_comp_smart_cb_unshading(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) { E_Comp_Object *cw = data; @@ -3172,7 +3159,6 @@ _e_comp_smart_add(Evas_Object *obj) evas_object_intercept_color_set_callback_add(obj, _e_comp_intercept_color_set, cw); evas_object_smart_callback_add(obj, "shading", _e_comp_smart_cb_shading, cw); - evas_object_smart_callback_add(obj, "shaded", _e_comp_smart_cb_shaded, cw); evas_object_smart_callback_add(obj, "unshading", _e_comp_smart_cb_unshading, cw); evas_object_smart_callback_add(obj, "unshaded", _e_comp_smart_cb_unshaded, cw); @@ -3438,7 +3424,7 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h) first = ((cw->w < 1) || (cw->h < 1)); cw->w = w, cw->h = h; - if ((!cw->ec->shading) && (!cw->ec->shaded)) + if ((!cw->ec->shading)) { int ww, hh, pw, ph; diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 56fcffb..4053737 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2126,7 +2126,7 @@ _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj EINA_UNUSED, void *event if (!(ec = data)) return; - if ((ec->shading) || (ec->shaded)) return; + if ((ec->shading)) return; if (!ec->comp_data->shell.configure_send) return; /* TODO: calculate x, y with transfrom object */ diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c index 243aaaa..241489a 100644 --- a/src/bin/e_desk.c +++ b/src/bin/e_desk.c @@ -1489,7 +1489,7 @@ _e_desk_show_end(void *data, Evas_Object *obj EINA_UNUSED, const char *emission if (ec_desk) ec_desk->animate_count--; - e_client_comp_hidden_set(ec, ec->shaded); + e_client_comp_hidden_set(ec, 0); e_comp_object_effect_unclip(ec->frame); ec->hidden = 0; if (!ec->visible) evas_object_show(ec->frame); @@ -1540,7 +1540,7 @@ _e_desk_show_begin(E_Desk *desk, int dx, int dy) else ec->hidden = 0; - e_client_comp_hidden_set(ec, ec->hidden || ec->shaded); + e_client_comp_hidden_set(ec, ec->hidden); evas_object_show(ec->frame); } } -- 2.7.4