From 3522a37c008a572c9990542a77d27c6aa7af035f Mon Sep 17 00:00:00 2001 From: MinJeong Kim Date: Thu, 26 May 2016 19:22:48 +0900 Subject: [PATCH] Refactored launchscreen codes - Added new member launchsrns of E_Comp is list of launchscreen clients. - Not give focus for launchscreen clients. - Clean up E_Launch_Screen code Change-Id: I56bf44624d4d014866adcf3260a592a08ccd17ce Signed-off-by: MinJeong Kim --- src/bin/e_client.c | 10 ++++-- src/bin/e_comp.c | 82 ---------------------------------------------- src/bin/e_comp.h | 11 +------ 3 files changed, 8 insertions(+), 95 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 57c88a9db5..998fcfe085 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -2706,8 +2706,7 @@ _e_client_visibility_zone_calculate(E_Zone *zone) } else { - if ((!evas_object_visible_get(ec->frame)) && - (ec != e_comp->launchscrn->ec)) + if (!evas_object_visible_get(ec->frame)) { if (cdata && !cdata->mapped) { @@ -2836,7 +2835,12 @@ _e_client_visibility_zone_calculate(E_Zone *zone) ec = e_client_focused_get(); if (ec != focus_ec) { - if (!focus_ec->floating) + //if focus_ec is for launchscreen, unset focused client. + if (eina_list_data_find(e_comp->launchscrns, focus_ec)) + { + e_client_focused_set(NULL); + } + else if (!focus_ec->floating) { e_client_focused_set(focus_ec); evas_object_focus_set(focus_ec->frame, 1); diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 992944c607..53ddc4763c 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -37,8 +37,6 @@ static E_Config_DD *conf_match_edd = NULL; static Ecore_Timer *action_timeout = NULL; static Eina_Bool gl_avail = EINA_FALSE; -E_Launch_Screen *launch_scrn = NULL; - static double ecore_frametime = 0; static int _e_comp_log_dom = -1; @@ -1132,73 +1130,6 @@ _e_comp_screensaver_off(void *data EINA_UNUSED, int type EINA_UNUSED, void *even return ECORE_CALLBACK_PASS_ON; } -static void -_e_launchscreen_free(E_Launch_Screen *plscrn) -{ - if (plscrn->shobj) - evas_object_del(plscrn->shobj); - if (plscrn->ep) - e_pixmap_del(plscrn->ep); - if (plscrn->ec) - e_object_del(E_OBJECT(plscrn->ec)); - - E_FREE(plscrn); -} - -E_Launch_Screen * -_e_launchscreen_new(Ecore_Evas *ee) -{ - E_Launch_Screen *plscrn = NULL; - - EINA_SAFETY_ON_NULL_GOTO(ee, error); - EINA_SAFETY_ON_NULL_GOTO(conf, error); - - if (conf->launch_file) - { - if (!edje_file_group_exists(conf->launch_file, "e/comp/effects/launch")) - goto error; - } - - plscrn = E_NEW(E_Launch_Screen, 1); - EINA_SAFETY_ON_NULL_GOTO(plscrn, error); - - plscrn->shobj = edje_object_add(e_comp->evas); - evas_object_name_set(plscrn->shobj, "launch_screen"); - - evas_object_move(plscrn->shobj, 0, 0); - evas_object_resize(plscrn->shobj, e_comp->w, e_comp->h); - evas_object_layer_set(plscrn->shobj, E_LAYER_CLIENT_TOP); - edje_object_file_set(plscrn->shobj, conf->launch_file, "e/comp/effects/launch"); - - plscrn->ep = e_pixmap_new(E_PIXMAP_TYPE_NONE, 0); - EINA_SAFETY_ON_NULL_GOTO(plscrn->ep, error); - plscrn->ec = e_client_new(plscrn->ep, 0, 1); - EINA_SAFETY_ON_NULL_GOTO(plscrn->ec, error); - - if (plscrn->ec->frame) - evas_object_resize(plscrn->ec->frame, plscrn->ec->zone->w, plscrn->ec->zone->h); - - plscrn->ec->netwm.pid = getpid(); - plscrn->ec->netwm.name = eina_stringshare_add("E-launch_screen"); - plscrn->ec->ignored = EINA_TRUE; - - return plscrn; - -error: - ERR("Could not initialize launchscreen"); - if (plscrn) - { - if (plscrn->shobj) - evas_object_del(plscrn->shobj); - if (plscrn->ep) - e_pixmap_del(plscrn->ep); - if (plscrn->ec) - e_object_del(E_OBJECT(plscrn->ec)); - E_FREE(plscrn); - } - return NULL; -} - ////////////////////////////////////////////////////////////////////////// EINTERN Eina_Bool @@ -1317,11 +1248,6 @@ e_comp_shutdown(void) e_object_del(E_OBJECT(ec)); } - if (e_comp->launchscrn) - { - _e_launchscreen_free(e_comp->launchscrn); - } - #ifdef HAVE_HWC if (e_comp->hwc) e_comp_hwc_shutdown(); @@ -1372,14 +1298,6 @@ e_comp_deferred_job(void) } e_main_ts("\tE_Pointer New Done"); - /* launchscreen setting */ - e_main_ts("\tLaunchScrn New"); - if (!e_comp->launchscrn) - { - e_comp->launchscrn = _e_launchscreen_new(e_comp->ee); - } - e_main_ts("\tLaunchScrn Done"); - e_main_ts("\tE_Comp_Wl_Deferred"); e_comp_wl_deferred_job(); e_main_ts("\tE_Comp_Wl_Deferred Done"); diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index 29cf5f97dc..15a6efd3db 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -64,14 +64,6 @@ extern E_API int E_EVENT_COMPOSITOR_FPS_UPDATE; typedef void (*E_Comp_Cb)(void); -typedef struct _E_Launch_Screen -{ - Evas_Object *shobj; - E_Pixmap *ep; - E_Client *ec; - Ecore_Timer *timeout; -} E_Launch_Screen; - typedef struct _E_Comp_Hook E_Comp_Hook; typedef enum _E_Comp_Hook_Point @@ -132,8 +124,6 @@ struct _E_Comp void *data; } autoclose; - E_Launch_Screen *launchscrn; - Eina_List *debug_rects; Eina_List *ignore_wins; @@ -185,6 +175,7 @@ struct _E_Comp Eina_Bool hwc : 1; Eina_List *connected_clients; + Eina_List *launchscrns; // list of dummy clients for launchscreen image. }; -- 2.34.1