revert desklock block_rect opacity change

block rects are for blocking view of the desktop. they exist for security,
preventing the desktop from being visible if a transparent lockscreen is
in use.

also split block_rects into per-zone rects for later use

ref c997077c17
This commit is contained in:
Mike Blumenkrantz 2017-01-06 12:56:22 -05:00 committed by Derek Foreman
parent ad32cee563
commit 912eb66b70
1 changed files with 23 additions and 13 deletions

View File

@ -28,7 +28,7 @@ static Eina_List *tasks = NULL;
static Eina_List *show_hooks = NULL; static Eina_List *show_hooks = NULL;
static Eina_List *hide_hooks = NULL; static Eina_List *hide_hooks = NULL;
static Eina_List *block_rects = NULL; static Evas_Object *block_rects[32] = {NULL};
static Eina_List *desklock_ifaces = NULL; static Eina_List *desklock_ifaces = NULL;
static E_Desklock_Interface *current_iface = NULL; static E_Desklock_Interface *current_iface = NULL;
@ -238,6 +238,7 @@ e_desklock_show(Eina_Bool suspend)
E_Event_Desklock *ev; E_Event_Desklock *ev;
E_Desklock_Show_Cb show_cb; E_Desklock_Show_Cb show_cb;
E_Desklock_Hide_Cb hide_cb; E_Desklock_Hide_Cb hide_cb;
E_Zone *zone;
if (_e_desklock_state) return EINA_TRUE; if (_e_desklock_state) return EINA_TRUE;
@ -274,8 +275,6 @@ e_desklock_show(Eina_Bool suspend)
{ {
if (!e_config->desklock_passwd) if (!e_config->desklock_passwd)
{ {
E_Zone *zone;
zone = e_zone_current_get(); zone = e_zone_current_get();
if (zone) if (zone)
e_configure_registry_call("screen/screen_lock", NULL, NULL); e_configure_registry_call("screen/screen_lock", NULL, NULL);
@ -289,16 +288,22 @@ e_desklock_show(Eina_Bool suspend)
if (!show_cb()) goto fail; if (!show_cb()) goto fail;
} }
{ EINA_LIST_FOREACH(e_comp->zones, l, zone)
Evas_Object *o; {
Evas_Object *o;
o = evas_object_rectangle_add(e_comp->evas); if (zone->num >= EINA_C_ARRAY_LENGTH(block_rects))
block_rects = eina_list_append(block_rects, o); {
evas_object_color_set(o, 0, 0, 0, 0); CRI("> %lu screens connected????", EINA_C_ARRAY_LENGTH(block_rects));
evas_object_resize(o, 99999, 99999); break;
evas_object_layer_set(o, E_LAYER_DESKLOCK); }
evas_object_show(o); o = evas_object_rectangle_add(e_comp->evas);
} block_rects[zone->num] = o;
evas_object_color_set(o, 0, 0, 0, 255);
evas_object_geometry_set(o, zone->x, zone->y, zone->w, zone->h);
evas_object_layer_set(o, E_LAYER_DESKLOCK);
evas_object_show(o);
}
if (e_config->desklock_language) if (e_config->desklock_language)
e_intl_language_set(e_config->desklock_language); e_intl_language_set(e_config->desklock_language);
@ -381,7 +386,12 @@ e_desklock_hide(void)
e_comp_override_del(); e_comp_override_del();
e_comp_shape_queue(); e_comp_shape_queue();
E_FREE_LIST(block_rects, evas_object_del); {
unsigned int n;
for (n = 0; n < EINA_C_ARRAY_LENGTH(block_rects); n++)
E_FREE_FUNC(block_rects[n], evas_object_del);
}
//e_comp_block_window_del(); //e_comp_block_window_del();
if (e_config->desklock_language) if (e_config->desklock_language)
e_intl_language_set(e_config->language); e_intl_language_set(e_config->language);