diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c index 9e98b3cce..5f1ed90f9 100644 --- a/src/bin/e_exec.c +++ b/src/bin/e_exec.c @@ -202,6 +202,10 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining) snprintf(buf, sizeof(buf), "E_START|%i", startup_id); e_util_env_set("DESKTOP_STARTUP_ID", buf); + // dont set vsync for clients - maybe inherited from compositore. fixme: + // need a way to still inherit from parent env of wm. + e_util_env_set("__GL_SYNC_TO_VBLANK", NULL); + e_util_library_path_strip(); //// FIXME: seem to be some issues with the pipe and filling up ram - need to //// check. for now disable. diff --git a/src/modules/comp/e_mod_comp.c b/src/modules/comp/e_mod_comp.c index 118ca94f2..dd7257b7a 100644 --- a/src/modules/comp/e_mod_comp.c +++ b/src/modules/comp/e_mod_comp.c @@ -1589,6 +1589,15 @@ _e_mod_comp_add(E_Manager *man) c = calloc(1, sizeof(E_Comp)); if (!c) return NULL; + if (_comp_mod->conf->vsync) + { + e_util_env_set("__GL_SYNC_TO_VBLANK", "1"); + } + else + { + e_util_env_set("__GL_SYNC_TO_VBLANK", NULL); + } + ecore_x_e_comp_sync_supported_set(man->root, _comp_mod->conf->efl_sync); c->man = man; diff --git a/src/modules/comp/e_mod_config.c b/src/modules/comp/e_mod_config.c index be156d431..1f0dd3a45 100644 --- a/src/modules/comp/e_mod_config.c +++ b/src/modules/comp/e_mod_config.c @@ -13,6 +13,7 @@ struct _E_Config_Dialog_Data int efl_sync; int loose_sync; int grab; + int vsync; int keep_unmapped; int max_unmapped_pixels; @@ -76,6 +77,7 @@ _create_data(E_Config_Dialog *cfd) cfdata->efl_sync = _comp_mod->conf->efl_sync; cfdata->loose_sync = _comp_mod->conf->loose_sync; cfdata->grab = _comp_mod->conf->grab; + cfdata->vsync = _comp_mod->conf->vsync; cfdata->keep_unmapped = _comp_mod->conf->keep_unmapped; cfdata->max_unmapped_pixels = _comp_mod->conf->max_unmapped_pixels; @@ -128,11 +130,13 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf /////////////////////////////////////////// ol = e_widget_list_add(evas, 0, 0); + ob = e_widget_check_add(evas, _("Sync screen (VBlank)"), &(cfdata->vsync)); + e_widget_list_object_append(ol, ob, 1, 1, 0.5); ob = e_widget_check_add(evas, _("Sync windows"), &(cfdata->efl_sync)); e_widget_list_object_append(ol, ob, 1, 1, 0.5); ob = e_widget_check_add(evas, _("Loose sync"), &(cfdata->loose_sync)); e_widget_list_object_append(ol, ob, 1, 1, 0.5); - ob = e_widget_check_add(evas, _("Grab X11 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_toolbook_page_append(otb, NULL, _("Sync"), ol, 0, 0, 0, 0, 0.5, 0.0); @@ -244,12 +248,14 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) if ((_comp_mod->conf->engine != cfdata->engine) || (cfdata->texture_from_pixmap != _comp_mod->conf->texture_from_pixmap) || (cfdata->efl_sync != _comp_mod->conf->efl_sync) || - (cfdata->loose_sync != _comp_mod->conf->loose_sync)) + (cfdata->loose_sync != _comp_mod->conf->loose_sync) || + (cfdata->vsync != _comp_mod->conf->vsync)) { _comp_mod->conf->engine = cfdata->engine; _comp_mod->conf->texture_from_pixmap = cfdata->texture_from_pixmap; _comp_mod->conf->efl_sync = cfdata->efl_sync; _comp_mod->conf->loose_sync = cfdata->loose_sync; + _comp_mod->conf->vsync = cfdata->vsync; e_mod_comp_shutdown(); e_mod_comp_init(); } diff --git a/src/modules/comp/e_mod_main.c b/src/modules/comp/e_mod_main.c index 383ed0d6c..02b0a5b47 100644 --- a/src/modules/comp/e_mod_main.c +++ b/src/modules/comp/e_mod_main.c @@ -52,6 +52,7 @@ e_modapi_init(E_Module *m) E_CONFIG_VAL(D, T, efl_sync, UCHAR); E_CONFIG_VAL(D, T, loose_sync, UCHAR); E_CONFIG_VAL(D, T, grab, UCHAR); + E_CONFIG_VAL(D, T, vsync, UCHAR); E_CONFIG_VAL(D, T, keep_unmapped, UCHAR); E_CONFIG_VAL(D, T, send_flush, UCHAR); E_CONFIG_VAL(D, T, send_dump, UCHAR); @@ -75,6 +76,7 @@ e_modapi_init(E_Module *m) mod->conf->efl_sync = 1; mod->conf->loose_sync = 1; mod->conf->grab = 0; + mod->conf->vsync = 1; mod->conf->keep_unmapped = 1; mod->conf->send_flush = 1; mod->conf->send_dump = 0; diff --git a/src/modules/comp/e_mod_main.h b/src/modules/comp/e_mod_main.h index 01ff9df2d..dba9d0e5b 100644 --- a/src/modules/comp/e_mod_main.h +++ b/src/modules/comp/e_mod_main.h @@ -15,6 +15,7 @@ struct _Config unsigned char loose_sync; unsigned char efl_sync; unsigned char grab; + unsigned char vsync; unsigned char keep_unmapped; unsigned char send_flush; unsigned char send_dump;