forked from enlightenment/enlightenment
e comp - remove the disable/fast effects
for fast we probably should look at something like having a multiplier on edj transitions and set it to 0 to make it instant. this would be much better and able to apply to ALL effects... so let's remove this way for now. as for no shaodws and other stuff - moving to wl cant control CSD and even then it's a theme look ant feel - a "flat theme withotu any shadows" would just not have them. probably not a checkbox to have here.
This commit is contained in:
parent
f89cb93829
commit
822680869f
|
@ -545,26 +545,15 @@ E_API void
|
||||||
e_comp_canvas_zone_update(E_Zone *zone)
|
e_comp_canvas_zone_update(E_Zone *zone)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
const char *const over_styles[] =
|
|
||||||
{
|
|
||||||
"e/comp/screen/overlay/default",
|
|
||||||
"e/comp/screen/overlay/noeffects"
|
|
||||||
};
|
|
||||||
const char *const under_styles[] =
|
|
||||||
{
|
|
||||||
"e/comp/screen/base/default",
|
|
||||||
"e/comp/screen/base/noeffects"
|
|
||||||
};
|
|
||||||
E_Comp_Config *conf = e_comp_config_get();
|
|
||||||
|
|
||||||
if (zone->over && zone->base)
|
if (zone->over && zone->base)
|
||||||
{
|
{
|
||||||
e_theme_edje_object_set(zone->base, "base/theme/comp",
|
e_theme_edje_object_set(zone->base, "base/theme/comp",
|
||||||
under_styles[conf->disable_screen_effects]);
|
"e/comp/screen/base/default");
|
||||||
edje_object_part_swallow(zone->base, "e.swallow.background",
|
edje_object_part_swallow(zone->base, "e.swallow.background",
|
||||||
zone->transition_object ?: zone->bg_object);
|
zone->transition_object ?: zone->bg_object);
|
||||||
e_theme_edje_object_set(zone->over, "base/theme/comp",
|
e_theme_edje_object_set(zone->over, "base/theme/comp",
|
||||||
over_styles[conf->disable_screen_effects]);
|
"e/comp/screen/overlay/default");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
E_FREE_FUNC(zone->base, evas_object_del);
|
E_FREE_FUNC(zone->base, evas_object_del);
|
||||||
|
@ -572,7 +561,7 @@ e_comp_canvas_zone_update(E_Zone *zone)
|
||||||
zone->base = o = edje_object_add(e_comp->evas);
|
zone->base = o = edje_object_add(e_comp->evas);
|
||||||
evas_object_repeat_events_set(o, 1);
|
evas_object_repeat_events_set(o, 1);
|
||||||
evas_object_name_set(zone->base, "zone->base");
|
evas_object_name_set(zone->base, "zone->base");
|
||||||
e_theme_edje_object_set(o, "base/theme/comp", under_styles[conf->disable_screen_effects]);
|
e_theme_edje_object_set(o, "base/theme/comp", "e/comp/screen/base/default");
|
||||||
edje_object_part_swallow(zone->base, "e.swallow.background", zone->transition_object ?: zone->bg_object);
|
edje_object_part_swallow(zone->base, "e.swallow.background", zone->transition_object ?: zone->bg_object);
|
||||||
evas_object_move(o, zone->x, zone->y);
|
evas_object_move(o, zone->x, zone->y);
|
||||||
evas_object_resize(o, zone->w, zone->h);
|
evas_object_resize(o, zone->w, zone->h);
|
||||||
|
@ -585,7 +574,7 @@ e_comp_canvas_zone_update(E_Zone *zone)
|
||||||
evas_object_raise(o);
|
evas_object_raise(o);
|
||||||
evas_object_name_set(zone->over, "zone->over");
|
evas_object_name_set(zone->over, "zone->over");
|
||||||
evas_object_pass_events_set(o, 1);
|
evas_object_pass_events_set(o, 1);
|
||||||
e_theme_edje_object_set(o, "base/theme/comp", over_styles[conf->disable_screen_effects]);
|
e_theme_edje_object_set(o, "base/theme/comp", "e/comp/screen/overlay/default");
|
||||||
evas_object_move(o, zone->x, zone->y);
|
evas_object_move(o, zone->x, zone->y);
|
||||||
evas_object_resize(o, zone->w, zone->h);
|
evas_object_resize(o, zone->w, zone->h);
|
||||||
evas_object_raise(o);
|
evas_object_raise(o);
|
||||||
|
|
|
@ -53,17 +53,7 @@ e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
|
||||||
E_CONFIG_VAL(D, T, nofade, UCHAR);
|
E_CONFIG_VAL(D, T, nofade, UCHAR);
|
||||||
E_CONFIG_VAL(D, T, smooth_windows, UCHAR);
|
E_CONFIG_VAL(D, T, smooth_windows, UCHAR);
|
||||||
E_CONFIG_VAL(D, T, first_draw_delay, DOUBLE);
|
E_CONFIG_VAL(D, T, first_draw_delay, DOUBLE);
|
||||||
E_CONFIG_VAL(D, T, disable_screen_effects, UCHAR);
|
|
||||||
E_CONFIG_VAL(D, T, enable_advanced_features, UCHAR);
|
E_CONFIG_VAL(D, T, enable_advanced_features, UCHAR);
|
||||||
E_CONFIG_VAL(D, T, fast_popups, UCHAR);
|
|
||||||
E_CONFIG_VAL(D, T, fast_borders, UCHAR);
|
|
||||||
E_CONFIG_VAL(D, T, fast_menus, UCHAR);
|
|
||||||
E_CONFIG_VAL(D, T, fast_overrides, UCHAR);
|
|
||||||
E_CONFIG_VAL(D, T, match.disable_popups, UCHAR);
|
|
||||||
E_CONFIG_VAL(D, T, match.disable_borders, UCHAR);
|
|
||||||
E_CONFIG_VAL(D, T, match.disable_overrides, UCHAR);
|
|
||||||
E_CONFIG_VAL(D, T, match.disable_menus, UCHAR);
|
|
||||||
E_CONFIG_VAL(D, T, match.disable_objects, UCHAR);
|
|
||||||
E_CONFIG_LIST(D, T, match.popups, *match_edd);
|
E_CONFIG_LIST(D, T, match.popups, *match_edd);
|
||||||
E_CONFIG_LIST(D, T, match.borders, *match_edd);
|
E_CONFIG_LIST(D, T, match.borders, *match_edd);
|
||||||
E_CONFIG_LIST(D, T, match.overrides, *match_edd);
|
E_CONFIG_LIST(D, T, match.overrides, *match_edd);
|
||||||
|
|
|
@ -30,26 +30,14 @@ struct _E_Comp_Config
|
||||||
unsigned char smooth_windows;
|
unsigned char smooth_windows;
|
||||||
unsigned char nofade;
|
unsigned char nofade;
|
||||||
double first_draw_delay;
|
double first_draw_delay;
|
||||||
Eina_Bool disable_screen_effects;
|
|
||||||
Eina_Bool enable_advanced_features;
|
Eina_Bool enable_advanced_features;
|
||||||
// the following options add the "/fast" suffix to the normal groups
|
|
||||||
Eina_Bool fast_popups;
|
|
||||||
Eina_Bool fast_borders;
|
|
||||||
Eina_Bool fast_menus;
|
|
||||||
Eina_Bool fast_overrides;
|
|
||||||
Eina_Bool fast_objects;
|
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
Eina_Bool disable_popups;
|
|
||||||
Eina_List *popups; // used for e popups
|
Eina_List *popups; // used for e popups
|
||||||
Eina_Bool disable_borders;
|
|
||||||
Eina_List *borders; // used for borders
|
Eina_List *borders; // used for borders
|
||||||
Eina_Bool disable_overrides;
|
|
||||||
Eina_List *overrides; // used for client menus, tooltips etc.
|
Eina_List *overrides; // used for client menus, tooltips etc.
|
||||||
Eina_Bool disable_menus;
|
|
||||||
Eina_List *menus; // used for e menus
|
Eina_List *menus; // used for e menus
|
||||||
Eina_Bool disable_objects;
|
|
||||||
Eina_List *objects; // used for e objects which are not popups or menus
|
Eina_List *objects; // used for e objects which are not popups or menus
|
||||||
} match;
|
} match;
|
||||||
};
|
};
|
||||||
|
|
|
@ -591,7 +591,7 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
|
||||||
E_Comp_Match *m;
|
E_Comp_Match *m;
|
||||||
Eina_Stringshare *reshadow_group = NULL;
|
Eina_Stringshare *reshadow_group = NULL;
|
||||||
Eina_Bool focus = EINA_FALSE, urgent = EINA_FALSE, skip = EINA_FALSE,
|
Eina_Bool focus = EINA_FALSE, urgent = EINA_FALSE, skip = EINA_FALSE,
|
||||||
fast = EINA_FALSE, reshadow = EINA_FALSE, no_shadow = EINA_FALSE, override;
|
reshadow = EINA_FALSE, no_shadow = EINA_FALSE, override;
|
||||||
Eina_Stringshare *name, *title;
|
Eina_Stringshare *name, *title;
|
||||||
E_Comp_Config *conf = e_comp_config_get();
|
E_Comp_Config *conf = e_comp_config_get();
|
||||||
|
|
||||||
|
@ -601,8 +601,7 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
|
||||||
list = override ? conf->match.overrides : conf->match.borders;
|
list = override ? conf->match.overrides : conf->match.borders;
|
||||||
name = cw->ec->icccm.name;
|
name = cw->ec->icccm.name;
|
||||||
title = cw->ec->icccm.title;
|
title = cw->ec->icccm.title;
|
||||||
skip = (override ? conf->match.disable_overrides : conf->match.disable_borders) || (title && (!strncmp(title, "noshadow", 8)));
|
skip = (title && (!strncmp(title, "noshadow", 8)));
|
||||||
fast = override ? conf->fast_overrides : conf->fast_borders;
|
|
||||||
|
|
||||||
/* skipping here is mostly a hack for systray because I hate it */
|
/* skipping here is mostly a hack for systray because I hate it */
|
||||||
if (!skip)
|
if (!skip)
|
||||||
|
@ -619,15 +618,6 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
|
||||||
no_shadow = m->no_shadow;
|
no_shadow = m->no_shadow;
|
||||||
if (m->shadow_style)
|
if (m->shadow_style)
|
||||||
{
|
{
|
||||||
/* fast effects are just themes with "/fast" appended and shorter effect times */
|
|
||||||
if (fast)
|
|
||||||
{
|
|
||||||
snprintf(buf, sizeof(buf), "e/comp/frame/%s/fast", m->shadow_style);
|
|
||||||
reshadow = ok = !e_util_strcmp(reshadow_group, buf);
|
|
||||||
if (!ok)
|
|
||||||
ok = e_theme_edje_object_set(cw->shobj, "base/theme/comp", buf);
|
|
||||||
}
|
|
||||||
/* default to non-fast style if fast not available */
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "e/comp/frame/%s", m->shadow_style);
|
snprintf(buf, sizeof(buf), "e/comp/frame/%s", m->shadow_style);
|
||||||
|
@ -652,13 +642,6 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
|
||||||
if (ok) break;
|
if (ok) break;
|
||||||
if (conf->shadow_style)
|
if (conf->shadow_style)
|
||||||
{
|
{
|
||||||
if (fast)
|
|
||||||
{
|
|
||||||
snprintf(buf, sizeof(buf), "e/comp/frame/%s/fast", conf->shadow_style);
|
|
||||||
reshadow = ok = !e_util_strcmp(reshadow_group, buf);
|
|
||||||
if (!ok)
|
|
||||||
ok = e_theme_edje_object_set(cw->shobj, "base/theme/comp", buf);
|
|
||||||
}
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "e/comp/frame/%s", conf->shadow_style);
|
snprintf(buf, sizeof(buf), "e/comp/frame/%s", conf->shadow_style);
|
||||||
|
@ -667,21 +650,12 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
|
||||||
ok = e_theme_edje_object_set(cw->shobj, "base/theme/comp", buf);
|
ok = e_theme_edje_object_set(cw->shobj, "base/theme/comp", buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!ok)
|
|
||||||
{
|
|
||||||
if (fast)
|
|
||||||
{
|
|
||||||
reshadow = ok = !e_util_strcmp(reshadow_group, "e/comp/frame/default/fast");
|
|
||||||
if (!ok)
|
|
||||||
ok = e_theme_edje_object_set(cw->shobj, "base/theme/comp", "e/comp/frame/default/fast");
|
|
||||||
}
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
reshadow = ok = !e_util_strcmp(reshadow_group, "e/comp/frame/default");
|
reshadow = ok = !e_util_strcmp(reshadow_group, "e/comp/frame/default");
|
||||||
if (!ok)
|
if (!ok)
|
||||||
ok = e_theme_edje_object_set(cw->shobj, "base/theme/comp", "e/comp/frame/default");
|
ok = e_theme_edje_object_set(cw->shobj, "base/theme/comp", "e/comp/frame/default");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* reshadow means this entire function call has been a no-op since we're re-setting the current style */
|
/* reshadow means this entire function call has been a no-op since we're re-setting the current style */
|
||||||
|
@ -2869,7 +2843,7 @@ e_comp_object_util_type_set(Evas_Object *obj, E_Comp_Object_Type type)
|
||||||
const char *name = NULL;
|
const char *name = NULL;
|
||||||
Eina_List *l, *list = NULL;
|
Eina_List *l, *list = NULL;
|
||||||
E_Comp_Config *conf = e_comp_config_get();
|
E_Comp_Config *conf = e_comp_config_get();
|
||||||
Eina_Bool skip = EINA_FALSE, fast = EINA_FALSE, shadow = EINA_FALSE;
|
Eina_Bool skip = EINA_FALSE, shadow = EINA_FALSE;
|
||||||
E_Comp_Match *m;
|
E_Comp_Match *m;
|
||||||
const char *grp;
|
const char *grp;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
@ -2882,19 +2856,13 @@ e_comp_object_util_type_set(Evas_Object *obj, E_Comp_Object_Type type)
|
||||||
{
|
{
|
||||||
case E_COMP_OBJECT_TYPE_MENU:
|
case E_COMP_OBJECT_TYPE_MENU:
|
||||||
list = conf->match.menus;
|
list = conf->match.menus;
|
||||||
skip = conf->match.disable_menus;
|
|
||||||
fast = conf->fast_menus;
|
|
||||||
shadow = EINA_TRUE;
|
shadow = EINA_TRUE;
|
||||||
break;
|
break;
|
||||||
case E_COMP_OBJECT_TYPE_POPUP:
|
case E_COMP_OBJECT_TYPE_POPUP:
|
||||||
list = conf->match.popups;
|
list = conf->match.popups;
|
||||||
skip = conf->match.disable_popups;
|
|
||||||
fast = conf->fast_popups;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
list = conf->match.objects;
|
list = conf->match.objects;
|
||||||
skip = conf->match.disable_objects;
|
|
||||||
fast = conf->fast_objects;
|
|
||||||
}
|
}
|
||||||
content = edje_object_part_swallow_get(obj, "e.swallow.content");
|
content = edje_object_part_swallow_get(obj, "e.swallow.content");
|
||||||
if (content)
|
if (content)
|
||||||
|
@ -2918,18 +2886,9 @@ e_comp_object_util_type_set(Evas_Object *obj, E_Comp_Object_Type type)
|
||||||
((name) && (m->name) && (!e_util_glob_match(name, m->name))))
|
((name) && (m->name) && (!e_util_glob_match(name, m->name))))
|
||||||
continue;
|
continue;
|
||||||
if (!m->shadow_style) continue;
|
if (!m->shadow_style) continue;
|
||||||
if (fast)
|
|
||||||
{
|
|
||||||
snprintf(buf, sizeof(buf), "e/comp/frame/%s/fast", m->shadow_style);
|
|
||||||
if (eina_streq(buf, grp)) return;
|
|
||||||
ok = e_theme_edje_object_set(obj, "base/theme/comp", buf);
|
|
||||||
}
|
|
||||||
if (!ok)
|
|
||||||
{
|
|
||||||
snprintf(buf, sizeof(buf), "e/comp/frame/%s", m->shadow_style);
|
snprintf(buf, sizeof(buf), "e/comp/frame/%s", m->shadow_style);
|
||||||
if (eina_streq(buf, grp)) return;
|
if (eina_streq(buf, grp)) return;
|
||||||
ok = e_theme_edje_object_set(obj, "base/theme/comp", buf);
|
ok = e_theme_edje_object_set(obj, "base/theme/comp", buf);
|
||||||
}
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
shadow = !m->no_shadow;
|
shadow = !m->no_shadow;
|
||||||
|
@ -2948,31 +2907,14 @@ e_comp_object_util_type_set(Evas_Object *obj, E_Comp_Object_Type type)
|
||||||
}
|
}
|
||||||
if (ok) break;
|
if (ok) break;
|
||||||
if (conf->shadow_style)
|
if (conf->shadow_style)
|
||||||
{
|
|
||||||
if (fast)
|
|
||||||
{
|
|
||||||
snprintf(buf, sizeof(buf), "e/comp/frame/%s/fast", conf->shadow_style);
|
|
||||||
if (eina_streq(buf, grp)) return;
|
|
||||||
ok = e_theme_edje_object_set(obj, "base/theme/comp", buf);
|
|
||||||
}
|
|
||||||
if (!ok)
|
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "e/comp/frame/%s", conf->shadow_style);
|
snprintf(buf, sizeof(buf), "e/comp/frame/%s", conf->shadow_style);
|
||||||
if (eina_streq(buf, grp)) return;
|
if (eina_streq(buf, grp)) return;
|
||||||
ok = e_theme_edje_object_set(obj, "base/theme/comp", buf);
|
ok = e_theme_edje_object_set(obj, "base/theme/comp", buf);
|
||||||
}
|
|
||||||
if (ok) break;
|
if (ok) break;
|
||||||
}
|
}
|
||||||
if (fast)
|
|
||||||
{
|
|
||||||
if (eina_streq("e/comp/frame/default/fast", grp)) return;
|
|
||||||
ok = e_theme_edje_object_set(obj, "base/theme/comp", "e/comp/frame/default/fast");
|
|
||||||
}
|
|
||||||
if (!ok)
|
|
||||||
{
|
|
||||||
if (eina_streq("e/comp/frame/default", grp)) return;
|
if (eina_streq("e/comp/frame/default", grp)) return;
|
||||||
ok = e_theme_edje_object_set(obj, "base/theme/comp", "e/comp/frame/default");
|
ok = e_theme_edje_object_set(obj, "base/theme/comp", "e/comp/frame/default");
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (shadow && (e_util_strcmp(evas_object_type_get(obj), "edje") || (!edje_object_data_get(obj, "noshadow"))))
|
if (shadow && (e_util_strcmp(evas_object_type_get(obj), "edje") || (!edje_object_data_get(obj, "noshadow"))))
|
||||||
|
@ -3727,9 +3669,6 @@ e_comp_object_signal_emit(Evas_Object *obj, const char *sig, const char *src)
|
||||||
if (cw->frame_object) edje_object_signal_emit(cw->frame_object, sig, src);
|
if (cw->frame_object) edje_object_signal_emit(cw->frame_object, sig, src);
|
||||||
if (cw->frame_icon && e_icon_edje_get(cw->frame_icon))
|
if (cw->frame_icon && e_icon_edje_get(cw->frame_icon))
|
||||||
edje_object_signal_emit(e_icon_edje_get(cw->frame_icon), sig, src);
|
edje_object_signal_emit(e_icon_edje_get(cw->frame_icon), sig, src);
|
||||||
if ((cw->ec->override && e_comp_config_get()->match.disable_overrides) ||
|
|
||||||
((!cw->ec->override) && e_comp_config_get()->match.disable_borders))
|
|
||||||
return;
|
|
||||||
/* start with highest priority callback first */
|
/* start with highest priority callback first */
|
||||||
EINA_INLIST_REVERSE_FOREACH(_e_comp_object_movers, prov)
|
EINA_INLIST_REVERSE_FOREACH(_e_comp_object_movers, prov)
|
||||||
{
|
{
|
||||||
|
@ -4417,8 +4356,7 @@ e_comp_object_effect_allowed_get(Evas_Object *obj)
|
||||||
API_ENTRY EINA_FALSE;
|
API_ENTRY EINA_FALSE;
|
||||||
|
|
||||||
if (!cw->shobj) return EINA_FALSE;
|
if (!cw->shobj) return EINA_FALSE;
|
||||||
if (cw->ec->override) return !e_comp_config_get()->match.disable_overrides;
|
return EINA_TRUE;
|
||||||
return !e_comp_config_get()->match.disable_borders;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* setup an api effect for a client */
|
/* setup an api effect for a client */
|
||||||
|
|
|
@ -39,17 +39,7 @@ struct _E_Config_Dialog_Data
|
||||||
int fps_corner;
|
int fps_corner;
|
||||||
int fps_average_range;
|
int fps_average_range;
|
||||||
double first_draw_delay;
|
double first_draw_delay;
|
||||||
int disable_screen_effects;
|
|
||||||
int enable_advanced_features;
|
int enable_advanced_features;
|
||||||
// the following options add the "/fast" suffix to the normal groups
|
|
||||||
int fast_popups;
|
|
||||||
int fast_borders;
|
|
||||||
int fast_menus;
|
|
||||||
int fast_overrides;
|
|
||||||
int fast_objects;
|
|
||||||
int fast;
|
|
||||||
Evas_Object *fast_ob;
|
|
||||||
int fast_changed E_BITFIELD;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Protos */
|
/* Protos */
|
||||||
|
@ -101,17 +91,6 @@ _create_data(E_Config_Dialog *cfd EINA_UNUSED)
|
||||||
(cfdata->engine != E_COMP_ENGINE_GL))
|
(cfdata->engine != E_COMP_ENGINE_GL))
|
||||||
cfdata->engine = E_COMP_ENGINE_SW;
|
cfdata->engine = E_COMP_ENGINE_SW;
|
||||||
|
|
||||||
cfdata->fast_popups = conf->fast_popups;
|
|
||||||
cfdata->fast_borders = conf->fast_borders;
|
|
||||||
cfdata->fast_overrides = conf->fast_overrides;
|
|
||||||
cfdata->fast_menus = conf->fast_menus;
|
|
||||||
cfdata->fast_objects = conf->fast_objects;
|
|
||||||
cfdata->match.disable_popups = conf->match.disable_popups;
|
|
||||||
cfdata->match.disable_borders = conf->match.disable_borders;
|
|
||||||
cfdata->match.disable_overrides = conf->match.disable_overrides;
|
|
||||||
cfdata->match.disable_menus = conf->match.disable_menus;
|
|
||||||
cfdata->match.disable_objects = conf->match.disable_objects;
|
|
||||||
cfdata->disable_screen_effects = conf->disable_screen_effects;
|
|
||||||
cfdata->enable_advanced_features = conf->enable_advanced_features;
|
cfdata->enable_advanced_features = conf->enable_advanced_features;
|
||||||
|
|
||||||
cfdata->indirect = conf->indirect;
|
cfdata->indirect = conf->indirect;
|
||||||
|
@ -163,12 +142,6 @@ _free_data(E_Config_Dialog *cfd EINA_UNUSED,
|
||||||
free(cfdata);
|
free(cfdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_advanced_comp_style_toggle(void *oi, Evas_Object *o)
|
|
||||||
{
|
|
||||||
e_widget_disabled_set(oi, e_widget_check_checked_get(o));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_advanced_matches_edit(void *data, void *d EINA_UNUSED)
|
_advanced_matches_edit(void *data, void *d EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
@ -203,53 +176,6 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
|
||||||
|
|
||||||
e_widget_toolbook_page_append(otb, NULL, _("Styles"), ol, 1, 1, 1, 1, 0.5, 0.0);
|
e_widget_toolbook_page_append(otb, NULL, _("Styles"), ol, 1, 1, 1, 1, 0.5, 0.0);
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
|
||||||
|
|
||||||
ol = e_widget_list_add(evas, 0, 0);
|
|
||||||
{
|
|
||||||
Evas_Object *w, *m, *p, *o1, *o2;
|
|
||||||
|
|
||||||
of = e_widget_framelist_add(evas, _("Fast Effects"), 0);
|
|
||||||
w = ob = e_widget_check_add(evas, _("Enable fast composite effects for windows"), &(cfdata->fast_borders));
|
|
||||||
e_widget_disabled_set(ob, cfdata->match.disable_borders);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
m = ob = e_widget_check_add(evas, _("Enable fast composite effects for menus"), &(cfdata->fast_menus));
|
|
||||||
e_widget_disabled_set(ob, cfdata->match.disable_menus);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
p = ob = e_widget_check_add(evas, _("Enable fast composite effects for popups"), &(cfdata->fast_popups));
|
|
||||||
e_widget_disabled_set(ob, cfdata->match.disable_popups);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
o1 = ob = e_widget_check_add(evas, _("Enable fast composite effects for objects"), &(cfdata->fast_objects));
|
|
||||||
e_widget_disabled_set(ob, cfdata->match.disable_objects);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
o2 = ob = e_widget_check_add(evas, _("Enable fast composite effects for overrides"), &(cfdata->fast_overrides));
|
|
||||||
e_widget_disabled_set(ob, cfdata->match.disable_overrides);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
e_widget_list_object_append(ol, of, 1, 0, 0.5);
|
|
||||||
|
|
||||||
of = e_widget_framelist_add(evas, _("Disable Effects"), 0);
|
|
||||||
ob = e_widget_check_add(evas, _("Disable composite effects for windows"), &(cfdata->match.disable_borders));
|
|
||||||
e_widget_on_change_hook_set(ob, _advanced_comp_style_toggle, w);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
ob = e_widget_check_add(evas, _("Disable composite effects for menus"), &(cfdata->match.disable_menus));
|
|
||||||
e_widget_on_change_hook_set(ob, _advanced_comp_style_toggle, m);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
ob = e_widget_check_add(evas, _("Disable composite effects for popups"), &(cfdata->match.disable_popups));
|
|
||||||
e_widget_on_change_hook_set(ob, _advanced_comp_style_toggle, p);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
ob = e_widget_check_add(evas, _("Disable composite effects for objects"), &(cfdata->match.disable_objects));
|
|
||||||
e_widget_on_change_hook_set(ob, _advanced_comp_style_toggle, o1);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
ob = e_widget_check_add(evas, _("Disable composite effects for overrides"), &(cfdata->match.disable_overrides));
|
|
||||||
e_widget_on_change_hook_set(ob, _advanced_comp_style_toggle, o2);
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
ob = e_widget_check_add(evas, _("Disable composite effects for screen"), &(cfdata->disable_screen_effects));
|
|
||||||
e_widget_framelist_object_append(of, ob);
|
|
||||||
e_widget_list_object_append(ol, of, 1, 0, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
e_widget_toolbook_page_append(otb, NULL, _("Effects"), ol, 1, 1, 1, 1, 0.5, 0.0);
|
|
||||||
|
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
ol = e_widget_list_add(evas, 0, 0);
|
ol = e_widget_list_add(evas, 0, 0);
|
||||||
of = e_widget_framelist_add(evas, _("Behavior"), 0);
|
of = e_widget_framelist_add(evas, _("Behavior"), 0);
|
||||||
|
@ -427,31 +353,9 @@ _advanced_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
|
||||||
(cfdata->fps_corner != conf->fps_corner) ||
|
(cfdata->fps_corner != conf->fps_corner) ||
|
||||||
(cfdata->fps_average_range != conf->fps_average_range) ||
|
(cfdata->fps_average_range != conf->fps_average_range) ||
|
||||||
(!EINA_DBL_EQ(cfdata->first_draw_delay, conf->first_draw_delay)) ||
|
(!EINA_DBL_EQ(cfdata->first_draw_delay, conf->first_draw_delay)) ||
|
||||||
(conf->match.disable_popups != cfdata->match.disable_popups) ||
|
(conf->enable_advanced_features != cfdata->enable_advanced_features)
|
||||||
(conf->match.disable_borders != cfdata->match.disable_borders) ||
|
|
||||||
(conf->match.disable_overrides != cfdata->match.disable_overrides) ||
|
|
||||||
(conf->match.disable_menus != cfdata->match.disable_menus) ||
|
|
||||||
(conf->match.disable_objects != cfdata->match.disable_objects) ||
|
|
||||||
(conf->disable_screen_effects != cfdata->disable_screen_effects) ||
|
|
||||||
(conf->enable_advanced_features != cfdata->enable_advanced_features) ||
|
|
||||||
(conf->fast_popups != cfdata->fast_popups) ||
|
|
||||||
(conf->fast_borders != cfdata->fast_borders) ||
|
|
||||||
(conf->fast_overrides != cfdata->fast_overrides) ||
|
|
||||||
(conf->fast_menus != cfdata->fast_menus) ||
|
|
||||||
(conf->fast_objects != cfdata->fast_objects)
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
conf->fast_popups = cfdata->fast_popups;
|
|
||||||
conf->fast_borders = cfdata->fast_borders;
|
|
||||||
conf->fast_overrides = cfdata->fast_overrides;
|
|
||||||
conf->fast_menus = cfdata->fast_menus;
|
|
||||||
conf->fast_objects = cfdata->fast_objects;
|
|
||||||
conf->match.disable_popups = cfdata->match.disable_popups;
|
|
||||||
conf->match.disable_borders = cfdata->match.disable_borders;
|
|
||||||
conf->match.disable_overrides = cfdata->match.disable_overrides;
|
|
||||||
conf->match.disable_menus = cfdata->match.disable_menus;
|
|
||||||
conf->match.disable_objects = cfdata->match.disable_objects;
|
|
||||||
conf->disable_screen_effects = cfdata->disable_screen_effects;
|
|
||||||
if (conf->enable_advanced_features != cfdata->enable_advanced_features)
|
if (conf->enable_advanced_features != cfdata->enable_advanced_features)
|
||||||
_advanced_features_changed(conf);
|
_advanced_features_changed(conf);
|
||||||
conf->lock_fps = cfdata->lock_fps;
|
conf->lock_fps = cfdata->lock_fps;
|
||||||
|
@ -495,20 +399,12 @@ _advanced_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_basic_comp_style_fast_toggle(void *data, Evas_Object *o EINA_UNUSED)
|
|
||||||
{
|
|
||||||
E_Config_Dialog_Data *cfdata = data;
|
|
||||||
cfdata->fast_changed = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_basic_comp_style_toggle(void *data, Evas_Object *o)
|
_basic_comp_style_toggle(void *data, Evas_Object *o)
|
||||||
{
|
{
|
||||||
E_Config_Dialog_Data *cfdata = data;
|
E_Config_Dialog_Data *cfdata = data;
|
||||||
|
|
||||||
e_widget_disabled_set(cfdata->styles_il, e_widget_check_checked_get(o));
|
e_widget_disabled_set(cfdata->styles_il, e_widget_check_checked_get(o));
|
||||||
e_widget_disabled_set(cfdata->fast_ob, e_widget_check_checked_get(o));
|
|
||||||
cfdata->match.toggle_changed = 1;
|
cfdata->match.toggle_changed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -534,21 +430,6 @@ _basic_create_widgets(E_Config_Dialog *cfd,
|
||||||
ob = e_widget_check_add(evas, _("Don't fade backlight"), &(cfdata->nofade));
|
ob = e_widget_check_add(evas, _("Don't fade backlight"), &(cfdata->nofade));
|
||||||
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
|
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
|
||||||
|
|
||||||
cfdata->fast =
|
|
||||||
(cfdata->fast_menus && cfdata->fast_overrides && cfdata->fast_borders && cfdata->fast_popups && cfdata->fast_objects);
|
|
||||||
cfdata->fast_ob = ob = e_widget_check_add(evas, _("Enable \"fast\" composite effects"), &(cfdata->fast));
|
|
||||||
evas_object_data_set(ob, "cfdata", cfdata);
|
|
||||||
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
|
|
||||||
e_widget_on_change_hook_set(ob, _basic_comp_style_fast_toggle, cfdata);
|
|
||||||
|
|
||||||
cfdata->match.disable_all =
|
|
||||||
(cfdata->match.disable_menus && cfdata->match.disable_overrides && cfdata->match.disable_borders &&
|
|
||||||
cfdata->match.disable_popups && cfdata->match.disable_objects && cfdata->disable_screen_effects);
|
|
||||||
e_widget_disabled_set(ob, cfdata->match.disable_all);
|
|
||||||
ob = e_widget_check_add(evas, _("Disable composite effects"), &(cfdata->match.disable_all));
|
|
||||||
evas_object_data_set(ob, "cfdata", cfdata);
|
|
||||||
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
|
|
||||||
|
|
||||||
of = e_widget_frametable_add(evas, _("Select default style"), 0);
|
of = e_widget_frametable_add(evas, _("Select default style"), 0);
|
||||||
e_widget_frametable_content_align_set(of, 0.5, 0.5);
|
e_widget_frametable_content_align_set(of, 0.5, 0.5);
|
||||||
cfdata->styles_il = oi = e_comp_style_selector_create(evas, &(cfdata->shadow_style));
|
cfdata->styles_il = oi = e_comp_style_selector_create(evas, &(cfdata->shadow_style));
|
||||||
|
@ -602,7 +483,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
|
||||||
{
|
{
|
||||||
E_Comp_Config *conf = e_comp_config_get();
|
E_Comp_Config *conf = e_comp_config_get();
|
||||||
|
|
||||||
if (cfdata->match.toggle_changed || cfdata->fast_changed ||
|
if (cfdata->match.toggle_changed ||
|
||||||
(cfdata->lock_fps != conf->lock_fps) ||
|
(cfdata->lock_fps != conf->lock_fps) ||
|
||||||
(cfdata->smooth_windows != conf->smooth_windows) ||
|
(cfdata->smooth_windows != conf->smooth_windows) ||
|
||||||
(cfdata->grab != conf->grab) ||
|
(cfdata->grab != conf->grab) ||
|
||||||
|
@ -621,23 +502,6 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
|
||||||
(!EINA_DBL_EQ(cfdata->first_draw_delay, conf->first_draw_delay))
|
(!EINA_DBL_EQ(cfdata->first_draw_delay, conf->first_draw_delay))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (cfdata->match.toggle_changed)
|
|
||||||
{
|
|
||||||
conf->match.disable_popups = cfdata->match.disable_popups = cfdata->match.disable_all;
|
|
||||||
conf->match.disable_borders = cfdata->match.disable_borders = cfdata->match.disable_all;
|
|
||||||
conf->match.disable_overrides = cfdata->match.disable_overrides = cfdata->match.disable_all;
|
|
||||||
conf->match.disable_menus = cfdata->match.disable_menus = cfdata->match.disable_all;
|
|
||||||
conf->match.disable_objects = cfdata->match.disable_objects = cfdata->match.disable_all;
|
|
||||||
conf->disable_screen_effects = cfdata->disable_screen_effects = cfdata->match.disable_all;
|
|
||||||
}
|
|
||||||
if (cfdata->fast_changed)
|
|
||||||
{
|
|
||||||
conf->fast_borders = cfdata->fast_borders = cfdata->fast;
|
|
||||||
conf->fast_popups = cfdata->fast_popups = cfdata->fast;
|
|
||||||
conf->fast_menus = cfdata->fast_menus = cfdata->fast;
|
|
||||||
conf->fast_objects = cfdata->fast_objects = cfdata->fast;
|
|
||||||
conf->fast_overrides = cfdata->fast_overrides = cfdata->fast;
|
|
||||||
}
|
|
||||||
conf->lock_fps = cfdata->lock_fps;
|
conf->lock_fps = cfdata->lock_fps;
|
||||||
conf->smooth_windows = cfdata->smooth_windows;
|
conf->smooth_windows = cfdata->smooth_windows;
|
||||||
conf->grab = cfdata->grab;
|
conf->grab = cfdata->grab;
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
static Eina_Bool do_gl = 0;
|
static Eina_Bool do_gl = 0;
|
||||||
static Eina_Bool do_vsync = 0;
|
static Eina_Bool do_vsync = 0;
|
||||||
static Eina_Bool disable_effects = 0;
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check_add(Evas_Object *box, const char *txt, Eina_Bool *val)
|
check_add(Evas_Object *box, const char *txt, Eina_Bool *val)
|
||||||
|
@ -14,17 +12,17 @@ check_add(Evas_Object *box, const char *txt, Eina_Bool *val)
|
||||||
Evas_Object *ck;
|
Evas_Object *ck;
|
||||||
|
|
||||||
ck = elm_check_add(box);
|
ck = elm_check_add(box);
|
||||||
evas_object_show(ck);
|
|
||||||
E_ALIGN(ck, 0, 0.5);
|
E_ALIGN(ck, 0, 0.5);
|
||||||
elm_object_text_set(ck, txt);
|
elm_object_text_set(ck, txt);
|
||||||
elm_check_state_pointer_set(ck, val);
|
elm_check_state_pointer_set(ck, val);
|
||||||
elm_box_pack_end(box, ck);
|
elm_box_pack_end(box, ck);
|
||||||
|
evas_object_show(ck);
|
||||||
}
|
}
|
||||||
|
|
||||||
E_API int
|
E_API int
|
||||||
wizard_page_show(E_Wizard_Page *pg EINA_UNUSED)
|
wizard_page_show(E_Wizard_Page *pg EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Evas_Object *o, *of;
|
Evas_Object *o, *of, *ob;
|
||||||
|
|
||||||
api->wizard_title_set(_("Compositing"));
|
api->wizard_title_set(_("Compositing"));
|
||||||
|
|
||||||
|
@ -48,10 +46,9 @@ wizard_page_show(E_Wizard_Page *pg EINA_UNUSED)
|
||||||
do_gl = do_vsync = 1;
|
do_gl = do_vsync = 1;
|
||||||
evas_gl_free(gl);
|
evas_gl_free(gl);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
check_add(o, _("Hardware Accelerated (OpenGL)"), &do_gl);
|
check_add(o, _("Hardware Accelerated (OpenGL)"), &do_gl);
|
||||||
check_add(o, _("Tear-free Rendering (OpenGL only)"), &do_vsync);
|
check_add(o, _("Tear-free Rendering (OpenGL only)"), &do_vsync);
|
||||||
}
|
|
||||||
check_add(o, _("Disable composite effects"), &disable_effects);
|
|
||||||
|
|
||||||
evas_object_show(of);
|
evas_object_show(of);
|
||||||
api->wizard_page_show(of);
|
api->wizard_page_show(of);
|
||||||
|
@ -77,15 +74,6 @@ wizard_page_hide(E_Wizard_Page *pg EINA_UNUSED)
|
||||||
conf->smooth_windows = 0;
|
conf->smooth_windows = 0;
|
||||||
conf->vsync = 0;
|
conf->vsync = 0;
|
||||||
}
|
}
|
||||||
if (disable_effects)
|
|
||||||
{
|
|
||||||
conf->disable_screen_effects =
|
|
||||||
conf->match.disable_borders =
|
|
||||||
conf->match.disable_popups =
|
|
||||||
conf->match.disable_menus =
|
|
||||||
conf->match.disable_objects =
|
|
||||||
conf->match.disable_overrides = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
e_comp_internal_save();
|
e_comp_internal_save();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue