now that comp is mandatory, I require options to completely disable comp effects before I can use e without tearing my eyes from their sockets

SVN revision: 82564
This commit is contained in:
Mike Blumenkrantz 2013-01-10 13:20:02 +00:00
parent 3394a2b461
commit 79a1d45534
7 changed files with 183 additions and 109 deletions

View File

@ -11,7 +11,8 @@
* e_menu_category_callback create callback parameter order has been changed
* composite settings dialog is now accessible from Settings menu
* modules no longer require shutdown or save functions
* comp module now uses the "e_comp" config domain
* comp settings now uses the "e_comp" config domain
* added options to disable comp effects on types of windows
2013-01-10 Deon Thomas

3
NEWS
View File

@ -22,7 +22,8 @@ Additions:
* Added option for disabling icons in menus
* Added option for doing desklock, blanking or dimming even when showing fullscreen windows.
* Added option for disabling pointer warping when performing directional focus changes using winlist
* comp module now uses the "e_comp" config domain
* comp settings now uses the "e_comp" config domain
* added options to disable comp effects on types of windows
Changes:
Modules:

View File

@ -1614,7 +1614,7 @@ _e_comp_win_shadow_setup(E_Comp_Win *cw)
char buf[4096];
Eina_List *list = NULL, *l;
E_Comp_Match *m;
Eina_Bool focus = EINA_FALSE, urgent = EINA_FALSE;
Eina_Bool focus = EINA_FALSE, urgent = EINA_FALSE, skip = EINA_FALSE;
const char *title = NULL, *name = NULL, *clas = NULL, *role = NULL;
Ecore_X_Window_Type primary_type = ECORE_X_WINDOW_TYPE_UNKNOWN;
@ -1632,6 +1632,7 @@ _e_comp_win_shadow_setup(E_Comp_Win *cw)
clas = cw->bd->client.icccm.class;
role = cw->bd->client.icccm.window_role;
primary_type = cw->bd->client.netwm.type;
skip = (conf->match.disable_borders);
}
else if (cw->pop)
{
@ -1640,11 +1641,13 @@ _e_comp_win_shadow_setup(E_Comp_Win *cw)
// etc. etc.
list = conf->match.popups;
name = cw->pop->name;
skip = (conf->match.disable_borders);
}
else if (cw->menu)
{
// FIXME: e has no way to tell e menus apart... need naming
list = conf->match.menus;
skip = (conf->match.disable_borders);
}
else
{
@ -1654,8 +1657,11 @@ _e_comp_win_shadow_setup(E_Comp_Win *cw)
clas = cw->clas;
role = cw->role;
primary_type = cw->primary_type;
skip = (conf->match.disable_borders);
}
if (!skip)
{
EINA_LIST_FOREACH(list, l, m)
{
if (((m->title) && (!title)) ||
@ -1765,15 +1771,14 @@ _e_comp_win_shadow_setup(E_Comp_Win *cw)
if (ok) break;
}
}
if (!ok)
}
while (!ok)
{
if (cw->bd && cw->bd->client.e.state.video)
if (skip || (cw->bd && cw->bd->client.e.state.video))
ok = e_theme_edje_object_set(cw->shobj,
"base/theme/borders",
"e/comp/none");
}
if (!ok)
{
if (ok) break;
if (conf->shadow_style)
{
snprintf(buf, sizeof(buf), "e/comp/%s",
@ -1784,6 +1789,7 @@ _e_comp_win_shadow_setup(E_Comp_Win *cw)
if (!ok)
ok = e_theme_edje_object_set(cw->shobj, "base/theme/borders",
"e/comp/default");
break;
}
edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->obj);
if (cw->bd && cw->bd->client.e.state.video)
@ -1807,6 +1813,7 @@ _e_comp_win_shadow_setup(E_Comp_Win *cw)
edje_object_signal_emit(cw->shobj, "e,state,visible,on", "e");
else
edje_object_signal_emit(cw->shobj, "e,state,visible,off", "e");
if (!cw->animating)
{
cw->c->animating++;

View File

@ -53,6 +53,10 @@ e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
E_CONFIG_VAL(D, T, nocomp_fs, UCHAR);
E_CONFIG_VAL(D, T, smooth_windows, UCHAR);
E_CONFIG_VAL(D, T, first_draw_delay, DOUBLE);
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_LIST(D, T, match.popups, *match_edd);
E_CONFIG_LIST(D, T, match.borders, *match_edd);
E_CONFIG_LIST(D, T, match.overrides, *match_edd);

View File

@ -31,9 +31,13 @@ struct _E_Comp_Config
struct
{
Eina_Bool disable_popups;
Eina_List *popups; // used for e popups
Eina_Bool disable_borders;
Eina_List *borders; // used for borders
Eina_Bool disable_overrides;
Eina_List *overrides; // used for client menus, tooltips etc.
Eina_Bool disable_menus;
Eina_List *menus; // used for e menus
} match;
};

View File

@ -40,11 +40,17 @@ struct _E_Config_Dialog_Data
struct
{
Eina_List *popups;
Eina_List *borders;
Eina_List *overrides;
Eina_List *menus;
int disable_popups;
Eina_List *popups; // used for e popups
int disable_borders;
Eina_List *borders; // used for borders
int disable_overrides;
Eina_List *overrides; // used for client menus, tooltips etc.
int disable_menus;
Eina_List *menus; // used for e menus
int disable_all;
int changed;
int toggle_changed : 1;
} match;
Evas_Object *popups_il;
@ -136,6 +142,12 @@ _create_data(E_Config_Dialog *cfd)
if ((cfdata->engine != ENGINE_SW) &&
(cfdata->engine != ENGINE_GL))
cfdata->engine = ENGINE_SW;
cfdata->match.disable_popups = _comp_mod->conf->match.disable_popups;
cfdata->match.disable_borders = _comp_mod->conf->match.disable_borders;
cfdata->match.disable_overrides = _comp_mod->conf->match.disable_overrides;
cfdata->match.disable_menus = _comp_mod->conf->match.disable_menus;
cfdata->match.disable_all =
(cfdata->match.disable_menus && cfdata->match.disable_menus && cfdata->match.disable_borders && cfdata->match.disable_popups);
cfdata->indirect = _comp_mod->conf->indirect;
cfdata->texture_from_pixmap = _comp_mod->conf->texture_from_pixmap;
cfdata->smooth_windows = _comp_mod->conf->smooth_windows;
@ -1161,6 +1173,16 @@ _advanced_create_widgets(E_Config_Dialog *cfd,
ob = e_widget_check_add(evas, _("Smooth scaling"), &(cfdata->smooth_windows));
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
ob = e_widget_check_add(evas, _("Disable composite theming for windows"), &(cfdata->match.disable_borders));
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
ob = e_widget_check_add(evas, _("Disable composite theming for menus"), &(cfdata->match.disable_menus));
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
ob = e_widget_check_add(evas, _("Disable composite theming for popups"), &(cfdata->match.disable_popups));
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
ob = e_widget_check_add(evas, _("Disable composite theming for overrides"), &(cfdata->match.disable_overrides));
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
of = e_widget_frametable_add(evas, _("Styles"), 0);
e_widget_frametable_content_align_set(of, 0.5, 0.5);
oi = _create_styles_toolbook(cfd, evas, cfdata);
@ -1377,6 +1399,10 @@ static int
_advanced_apply_data(E_Config_Dialog *cfd __UNUSED__,
E_Config_Dialog_Data *cfdata)
{
_comp_mod->conf->match.disable_popups = cfdata->match.disable_popups;
_comp_mod->conf->match.disable_borders = cfdata->match.disable_borders;
_comp_mod->conf->match.disable_overrides = cfdata->match.disable_overrides;
_comp_mod->conf->match.disable_menus = cfdata->match.disable_menus;
if ((cfdata->lock_fps != _comp_mod->conf->lock_fps) ||
(cfdata->smooth_windows != _comp_mod->conf->smooth_windows) ||
(cfdata->grab != _comp_mod->conf->grab) ||
@ -1487,6 +1513,16 @@ _advanced_apply_data(E_Config_Dialog *cfd __UNUSED__,
return 1;
}
static void
_basic_comp_style_toggle(void *oi, Evas_Object *o)
{
E_Config_Dialog_Data *cfdata;
e_widget_disabled_set(oi, e_widget_check_checked_get(o));
cfdata = evas_object_data_get(o, "cfdata");
cfdata->match.toggle_changed = 1;
}
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED,
Evas *evas,
@ -1517,12 +1553,18 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED,
ob = e_widget_check_add(evas, _("Don't composite fullscreen windows"), &(cfdata->nocomp_fs));
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
ob = e_widget_check_add(evas, _("Disable composite styling"), &(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);
e_widget_frametable_content_align_set(of, 0.5, 0.5);
oi = _style_selector(evas, &(cfdata->shadow_style));
e_widget_frametable_object_append(of, oi, 0, 0, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
e_widget_on_change_hook_set(ob, _basic_comp_style_toggle, oi);
e_widget_toolbook_page_append(otb, NULL, _("General"), ol, 1, 1, 1, 1, 0.5, 0.0);
///////////////////////////////////////////
@ -1556,6 +1598,13 @@ static int
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__,
E_Config_Dialog_Data *cfdata)
{
if (cfdata->match.toggle_changed)
{
_comp_mod->conf->match.disable_popups = cfdata->match.disable_popups = cfdata->match.disable_all;
_comp_mod->conf->match.disable_borders = cfdata->match.disable_borders = cfdata->match.disable_all;
_comp_mod->conf->match.disable_overrides = cfdata->match.disable_overrides = cfdata->match.disable_all;
_comp_mod->conf->match.disable_menus = cfdata->match.disable_menus = cfdata->match.disable_all;
}
if ((cfdata->lock_fps != _comp_mod->conf->lock_fps) ||
(cfdata->smooth_windows != _comp_mod->conf->smooth_windows) ||
(cfdata->grab != _comp_mod->conf->grab) ||

View File

@ -118,6 +118,14 @@ e_modapi_init(E_Module *m)
E_CONFIGURE_OPTION_ADD(co, BOOL, vsync, mod->conf, _("Tear-free compositing (VSYNC)"), _("composite"), _("border"));
co->requires_restart = 1;
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
E_CONFIGURE_OPTION_ADD(co, BOOL, match.disable_borders, mod->conf, _("Disable composite theming for windows"), _("composite"), _("border"), _("theme"));
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
E_CONFIGURE_OPTION_ADD(co, BOOL, match.disable_menus, mod->conf, _("Disable composite theming for menus"), _("composite"), _("menu"), _("theme"));
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
E_CONFIGURE_OPTION_ADD(co, BOOL, match.disable_popups, mod->conf, _("Disable composite theming for popups"), _("composite"), _("popup"), _("theme"));
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
E_CONFIGURE_OPTION_ADD(co, BOOL, match.disable_overrides, mod->conf, _("Disable composite theming for override-redirect windows (tooltips and such)"), _("composite"), _("theme"));
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
E_CONFIGURE_OPTION_ADD(co, BOOL, smooth_windows, mod->conf, _("Smooth scaling of composited window content"), _("composite"), _("border"));
co->funcs[1].none = co->funcs[0].none = e_comp_shadow_set;
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));