forked from enlightenment/enlightenment
e17:comp: add config option for initial draw timeout.
- no more laggy everything, reduced default timeout from 0.2 to 0.05 - add match for everything for new configs SVN revision: 57780
This commit is contained in:
parent
6f65815b3d
commit
0ab4fa35e4
|
@ -375,9 +375,8 @@ _e_mod_comp_win_ready_timeout_setup(E_Comp_Win *cw)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// FIXME 0.2 -> make config val
|
|
||||||
cw->ready_timeout = ecore_timer_add
|
cw->ready_timeout = ecore_timer_add
|
||||||
(0.2, _e_mod_comp_cb_win_show_ready_timeout, cw);
|
(_comp_mod->conf->first_draw_delay, _e_mod_comp_cb_win_show_ready_timeout, cw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ struct _E_Config_Dialog_Data
|
||||||
int fps_show;
|
int fps_show;
|
||||||
int fps_corner;
|
int fps_corner;
|
||||||
int fps_average_range;
|
int fps_average_range;
|
||||||
|
double first_draw_delay;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -147,6 +148,7 @@ _create_data(E_Config_Dialog *cfd)
|
||||||
cfdata->fps_average_range = _comp_mod->conf->fps_average_range;
|
cfdata->fps_average_range = _comp_mod->conf->fps_average_range;
|
||||||
if (cfdata->fps_average_range < 1) cfdata->fps_average_range = 12;
|
if (cfdata->fps_average_range < 1) cfdata->fps_average_range = 12;
|
||||||
else if (cfdata->fps_average_range > 120) cfdata->fps_average_range = 120;
|
else if (cfdata->fps_average_range > 120) cfdata->fps_average_range = 120;
|
||||||
|
cfdata->first_draw_delay = _comp_mod->conf->first_draw_delay;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_comp_mod->conf->match.popups, l, m)
|
EINA_LIST_FOREACH(_comp_mod->conf->match.popups, l, m)
|
||||||
{
|
{
|
||||||
|
@ -1148,6 +1150,10 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
||||||
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
|
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
|
||||||
ob = e_widget_check_add(evas, _("Grab Server during draw"), &(cfdata->grab));
|
ob = e_widget_check_add(evas, _("Grab Server during draw"), &(cfdata->grab));
|
||||||
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
|
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
|
||||||
|
ob = e_widget_label_add(evas, _("Initial draw timeout"));
|
||||||
|
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
|
||||||
|
ob = e_widget_slider_add(evas, 1, 0, _("%1.2f Seconds"), 0.01, 0.5, 0.01, 0, &(cfdata->first_draw_delay), NULL, 150);
|
||||||
|
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
|
||||||
e_widget_toolbook_page_append(otb, NULL, _("Sync"), ol, 0, 0, 0, 0, 0.5, 0.0);
|
e_widget_toolbook_page_append(otb, NULL, _("Sync"), ol, 0, 0, 0, 0, 0.5, 0.0);
|
||||||
|
|
||||||
ol = e_widget_list_add(evas, 0, 0);
|
ol = e_widget_list_add(evas, 0, 0);
|
||||||
|
@ -1328,6 +1334,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
(cfdata->fps_show != _comp_mod->conf->fps_show) ||
|
(cfdata->fps_show != _comp_mod->conf->fps_show) ||
|
||||||
(cfdata->fps_corner != _comp_mod->conf->fps_corner) ||
|
(cfdata->fps_corner != _comp_mod->conf->fps_corner) ||
|
||||||
(cfdata->fps_average_range != _comp_mod->conf->fps_average_range) ||
|
(cfdata->fps_average_range != _comp_mod->conf->fps_average_range) ||
|
||||||
|
(cfdata->first_draw_delay != _comp_mod->conf->first_draw_delay) ||
|
||||||
(cfdata->match.changed)
|
(cfdata->match.changed)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -1391,6 +1398,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
_comp_mod->conf->fps_show = cfdata->fps_show;
|
_comp_mod->conf->fps_show = cfdata->fps_show;
|
||||||
_comp_mod->conf->fps_corner = cfdata->fps_corner;
|
_comp_mod->conf->fps_corner = cfdata->fps_corner;
|
||||||
_comp_mod->conf->fps_average_range = cfdata->fps_average_range;
|
_comp_mod->conf->fps_average_range = cfdata->fps_average_range;
|
||||||
|
_comp_mod->conf->first_draw_delay = cfdata->first_draw_delay;
|
||||||
if (_comp_mod->conf->shadow_style)
|
if (_comp_mod->conf->shadow_style)
|
||||||
eina_stringshare_del(_comp_mod->conf->shadow_style);
|
eina_stringshare_del(_comp_mod->conf->shadow_style);
|
||||||
_comp_mod->conf->shadow_style = NULL;
|
_comp_mod->conf->shadow_style = NULL;
|
||||||
|
|
|
@ -90,6 +90,7 @@ e_modapi_init(E_Module *m)
|
||||||
E_CONFIG_VAL(D, T, send_dump, UCHAR);
|
E_CONFIG_VAL(D, T, send_dump, UCHAR);
|
||||||
E_CONFIG_VAL(D, T, nocomp_fs, UCHAR);
|
E_CONFIG_VAL(D, T, nocomp_fs, 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_LIST(D, T, match.popups, mod->conf_match_edd);
|
E_CONFIG_LIST(D, T, match.popups, mod->conf_match_edd);
|
||||||
E_CONFIG_LIST(D, T, match.borders, mod->conf_match_edd);
|
E_CONFIG_LIST(D, T, match.borders, mod->conf_match_edd);
|
||||||
E_CONFIG_LIST(D, T, match.overrides, mod->conf_match_edd);
|
E_CONFIG_LIST(D, T, match.overrides, mod->conf_match_edd);
|
||||||
|
@ -103,6 +104,9 @@ e_modapi_init(E_Module *m)
|
||||||
e_config->use_composite = 1;
|
e_config->use_composite = 1;
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
}
|
}
|
||||||
|
/* XXX remove: update old configs. add config versioning */
|
||||||
|
if (mod->conf->first_draw_delay == 0)
|
||||||
|
mod->conf->first_draw_delay = 0.05;
|
||||||
|
|
||||||
_comp_mod = mod;
|
_comp_mod = mod;
|
||||||
|
|
||||||
|
@ -145,6 +149,7 @@ _e_mod_config_new(E_Module *m)
|
||||||
mod->conf->send_dump = 0; // implement
|
mod->conf->send_dump = 0; // implement
|
||||||
mod->conf->nocomp_fs = 0; // buggy
|
mod->conf->nocomp_fs = 0; // buggy
|
||||||
mod->conf->smooth_windows = 0;
|
mod->conf->smooth_windows = 0;
|
||||||
|
mod->conf->first_draw_delay = 0.05;
|
||||||
|
|
||||||
mod->conf->match.popups = NULL;
|
mod->conf->match.popups = NULL;
|
||||||
mat = E_NEW(Match, 1);
|
mat = E_NEW(Match, 1);
|
||||||
|
@ -165,6 +170,11 @@ _e_mod_config_new(E_Module *m)
|
||||||
mat->shadow_style = eina_stringshare_add("none");
|
mat->shadow_style = eina_stringshare_add("none");
|
||||||
mat = E_NEW(Match, 1);
|
mat = E_NEW(Match, 1);
|
||||||
mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat);
|
mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat);
|
||||||
|
mat->name = eina_stringshare_add("E");
|
||||||
|
mat->clas = eina_stringshare_add("everything");
|
||||||
|
mat->shadow_style = eina_stringshare_add("popup");
|
||||||
|
mat = E_NEW(Match, 1);
|
||||||
|
mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat);
|
||||||
mat->primary_type = ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
|
mat->primary_type = ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
|
||||||
mat->shadow_style = eina_stringshare_add("menu");
|
mat->shadow_style = eina_stringshare_add("menu");
|
||||||
mat = E_NEW(Match, 1);
|
mat = E_NEW(Match, 1);
|
||||||
|
|
|
@ -30,8 +30,9 @@ struct _Config
|
||||||
unsigned char send_dump;
|
unsigned char send_dump;
|
||||||
unsigned char nocomp_fs;
|
unsigned char nocomp_fs;
|
||||||
unsigned char smooth_windows;
|
unsigned char smooth_windows;
|
||||||
|
double first_draw_delay;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
Eina_List *popups; // used for e popups
|
Eina_List *popups; // used for e popups
|
||||||
Eina_List *borders; // used for borders
|
Eina_List *borders; // used for borders
|
||||||
Eina_List *overrides; // used for client menus, tooltips etc.
|
Eina_List *overrides; // used for client menus, tooltips etc.
|
||||||
|
|
Loading…
Reference in New Issue