forked from enlightenment/enlightenment
fix some design and policy issues so it's simple and sane tyo write a
new home screen and softkey - looking at indicator next. SVN revision: 57119
This commit is contained in:
parent
599e4570d0
commit
a82f5c99c4
|
@ -380,6 +380,20 @@ _e_mod_policy_cb_zone_move_resize(void *data __UNUSED__, int type __UNUSED__, vo
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static E_Zone *
|
||||||
|
_e_mod_zone_win_get(Ecore_X_Window win)
|
||||||
|
{
|
||||||
|
E_Zone *zone = NULL;
|
||||||
|
E_Border *bd;
|
||||||
|
|
||||||
|
if (!(bd = e_border_find_by_client_window(win)))
|
||||||
|
{
|
||||||
|
if (!(zone = e_util_zone_window_find(win))) return NULL;
|
||||||
|
}
|
||||||
|
else if (bd->zone) zone = bd->zone;
|
||||||
|
return zone;
|
||||||
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *event)
|
_e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||||
{
|
{
|
||||||
|
@ -398,7 +412,7 @@ _e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void
|
||||||
{
|
{
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
if (!(zone = e_util_zone_window_find(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
if (!(zone = _e_mod_zone_win_get(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
||||||
if ((_policy) && (_policy->funcs.zone_mode_change))
|
if ((_policy) && (_policy->funcs.zone_mode_change))
|
||||||
_policy->funcs.zone_mode_change(zone, ev->data.l[0]);
|
_policy->funcs.zone_mode_change(zone, ev->data.l[0]);
|
||||||
}
|
}
|
||||||
|
@ -406,7 +420,7 @@ _e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void
|
||||||
{
|
{
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
if (!(zone = e_util_zone_window_find(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
if (!(zone = _e_mod_zone_win_get(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
||||||
if ((_policy) && (_policy->funcs.zone_close))
|
if ((_policy) && (_policy->funcs.zone_close))
|
||||||
_policy->funcs.zone_close(zone);
|
_policy->funcs.zone_close(zone);
|
||||||
}
|
}
|
||||||
|
@ -414,7 +428,7 @@ _e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void
|
||||||
{
|
{
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
if (!(zone = e_util_zone_window_find(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
if (!(zone = _e_mod_zone_win_get(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
||||||
if ((_policy) && (_policy->funcs.focus_back))
|
if ((_policy) && (_policy->funcs.focus_back))
|
||||||
_policy->funcs.focus_back(zone);
|
_policy->funcs.focus_back(zone);
|
||||||
}
|
}
|
||||||
|
@ -422,7 +436,7 @@ _e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void
|
||||||
{
|
{
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
if (!(zone = e_util_zone_window_find(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
if (!(zone = _e_mod_zone_win_get(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
||||||
if ((_policy) && (_policy->funcs.focus_forward))
|
if ((_policy) && (_policy->funcs.focus_forward))
|
||||||
_policy->funcs.focus_forward(zone);
|
_policy->funcs.focus_forward(zone);
|
||||||
}
|
}
|
||||||
|
@ -430,7 +444,7 @@ _e_mod_policy_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void
|
||||||
{
|
{
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
if (!(zone = e_util_zone_window_find(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
if (!(zone = _e_mod_zone_win_get(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
||||||
if ((_policy) && (_policy->funcs.focus_home))
|
if ((_policy) && (_policy->funcs.focus_home))
|
||||||
_policy->funcs.focus_home(zone);
|
_policy->funcs.focus_home(zone);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,11 @@ _policy_border_set_focus(E_Border *bd)
|
||||||
/* if the border was hidden due to layout, we need to unhide */
|
/* if the border was hidden due to layout, we need to unhide */
|
||||||
if (!bd->visible) e_illume_border_show(bd);
|
if (!bd->visible) e_illume_border_show(bd);
|
||||||
|
|
||||||
|
if ((bd->iconic) && (!bd->lock_user_iconify))
|
||||||
|
e_border_uniconify(bd);
|
||||||
|
|
||||||
|
if (!bd->lock_user_stacking) e_border_raise(bd);
|
||||||
|
|
||||||
/* focus the border */
|
/* focus the border */
|
||||||
e_border_focus_set(bd, 1, 1);
|
e_border_focus_set(bd, 1, 1);
|
||||||
|
|
||||||
|
@ -367,8 +372,6 @@ _policy_zone_layout_softkey(E_Border *bd, E_Illume_Config_Zone *cz)
|
||||||
{
|
{
|
||||||
int ny;
|
int ny;
|
||||||
|
|
||||||
// printf("\tLayout Softkey\n");
|
|
||||||
|
|
||||||
if (!bd) return;
|
if (!bd) return;
|
||||||
|
|
||||||
/* grab minimum softkey size */
|
/* grab minimum softkey size */
|
||||||
|
@ -393,6 +396,10 @@ _policy_zone_layout_softkey(E_Border *bd, E_Illume_Config_Zone *cz)
|
||||||
* So for now, just disable the ny check until this gets sorted out */
|
* So for now, just disable the ny check until this gets sorted out */
|
||||||
// if ((bd->x != bd->zone->x) || (bd->y != ny))
|
// if ((bd->x != bd->zone->x) || (bd->y != ny))
|
||||||
_policy_border_move(bd, bd->zone->x, ny);
|
_policy_border_move(bd, bd->zone->x, ny);
|
||||||
|
// set property for apps to find out they are
|
||||||
|
ecore_x_e_illume_softkey_geometry_set(bd->zone->black_win,
|
||||||
|
bd->x, bd->y,
|
||||||
|
bd->w, bd->h);
|
||||||
|
|
||||||
/* set layer if needed */
|
/* set layer if needed */
|
||||||
if (bd->layer != POL_SOFTKEY_LAYER)
|
if (bd->layer != POL_SOFTKEY_LAYER)
|
||||||
|
@ -1626,8 +1633,6 @@ _policy_focus_home(E_Zone *zone)
|
||||||
{
|
{
|
||||||
E_Border *bd;
|
E_Border *bd;
|
||||||
|
|
||||||
// printf("Focus home\n");
|
|
||||||
|
|
||||||
if (!zone) return;
|
if (!zone) return;
|
||||||
if (!(bd = e_illume_border_home_get(zone))) return;
|
if (!(bd = e_illume_border_home_get(zone))) return;
|
||||||
_policy_border_set_focus(bd);
|
_policy_border_set_focus(bd);
|
||||||
|
|
Loading…
Reference in New Issue