int render_overflow;
Eina_Bool gl : 1;
- Eina_Bool efl_sync : 1;
Eina_Bool grabbed : 1;
};
{
E_Comp *c = data;
-// ecore_x_ungrab();
- c->grabbed = 0;
+ if (_comp_mod->conf->grab)
+ {
+ if (c->grabbed)
+ {
+ ecore_x_ungrab();
+ c->grabbed = 0;
+ }
+ }
}
static int
E_Comp_Win *cw;
Eina_List *new_updates = NULL; // for failed pixmap fetches - get them next frame
Eina_List *update_done = NULL;
-
-// ecore_x_grab();
-// ecore_x_sync();
- c->grabbed = 1;
+
+ if (_comp_mod->conf->grab)
+ {
+ ecore_x_grab();
+ ecore_x_sync();
+ c->grabbed = 1;
+ }
EINA_LIST_FREE(c->updates, cw)
{
- if (c->efl_sync)
+ if (_comp_mod->conf->efl_sync)
{
if (((cw->counter) && (cw->drawme)) || (!cw->counter))
{
}
if (_comp_mod->conf->lock_fps)
ecore_evas_manual_render(c->ee);
- if (c->efl_sync)
+ if (_comp_mod->conf->efl_sync)
{
EINA_LIST_FREE(update_done, cw)
{
ecore_x_sync_counter_inc(cw->counter, 1);
}
}
- if (c->grabbed)
+ if (_comp_mod->conf->grab)
{
- c->grabbed = 0;
-// ecore_x_ungrab();
+ if (c->grabbed)
+ {
+ c->grabbed = 0;
+ ecore_x_ungrab();
+ }
}
if (new_updates) _e_mod_comp_render_queue(c);
c->updates = new_updates;
eina_hash_add(borders, e_util_winid_str_get(cw->bd->client.win), cw);
cw->dfn = e_object_delfn_add(E_OBJECT(cw->bd),
_e_mod_comp_object_del, cw);
- if (cw->c->efl_sync)
+ if (_comp_mod->conf->efl_sync)
{
- if (_e_mod_comp_win_is_borderless(cw))
+ if (_e_mod_comp_win_is_borderless(cw) ||
+ (_comp_mod->conf->loose_sync))
{
counter = ecore_x_e_comp_sync_counter_get(cw->bd->client.win);
if (counter)
ecore_timer_del(cw->update_timeout);
cw->update_timeout = NULL;
}
- if (cw->c->efl_sync)
+ if (_comp_mod->conf->efl_sync)
{
if ((cw->bd) && (cw->counter))
ecore_x_e_comp_sync_end_send(cw->bd->client.win);
if (cw->counter)
{
if (!cw->update_timeout)
- cw->update_timeout = ecore_timer_add(0.25, _e_mod_comp_win_damage_timeout, cw);
+ cw->update_timeout = ecore_timer_add
+ (ecore_animator_frametime_get() * 2,
+ _e_mod_comp_win_damage_timeout, cw);
return;
}
if (!cw->update)
c = calloc(1, sizeof(E_Comp));
if (!c) return NULL;
- c->efl_sync = _comp_mod->conf->efl_sync;
- ecore_x_e_comp_sync_supported_set(man->root, c->efl_sync);
+ ecore_x_e_comp_sync_supported_set(man->root, _comp_mod->conf->efl_sync);
c->man = man;
c->win = ecore_x_composite_render_window_enable(man->root);
int texture_from_pixmap;
int lock_fps;
int efl_sync;
+ int loose_sync;
+ int grab;
};
/* Protos */
cfdata->texture_from_pixmap = _comp_mod->conf->texture_from_pixmap;
cfdata->lock_fps = _comp_mod->conf->lock_fps;
cfdata->efl_sync = _comp_mod->conf->efl_sync;
+ cfdata->loose_sync = _comp_mod->conf->loose_sync;
+ cfdata->grab = _comp_mod->conf->grab;
return cfdata;
}
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Limit FPS"), &(cfdata->lock_fps));
e_widget_framelist_object_append(of, ob);
- ob = e_widget_check_add(evas, _("Sync EFL Windows"), &(cfdata->efl_sync));
+ ob = e_widget_check_add(evas, _("Sync EFL windows"), &(cfdata->efl_sync));
+ e_widget_framelist_object_append(of, ob);
+ ob = e_widget_check_add(evas, _("Loose Sync"), &(cfdata->loose_sync));
+ e_widget_framelist_object_append(of, ob);
+ ob = e_widget_check_add(evas, _("Grab during composite"), &(cfdata->grab));
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 1);
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
if ((_comp_mod->conf->use_shadow != cfdata->use_shadow) ||
- (cfdata->lock_fps != _comp_mod->conf->lock_fps))
+ (cfdata->lock_fps != _comp_mod->conf->lock_fps) ||
+ (cfdata->grab != _comp_mod->conf->grab))
{
_comp_mod->conf->use_shadow = cfdata->use_shadow;
_comp_mod->conf->lock_fps = cfdata->lock_fps;
+ _comp_mod->conf->grab = cfdata->grab;
e_mod_comp_shadow_set();
}
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->efl_sync != _comp_mod->conf->efl_sync) ||
+ (cfdata->loose_sync != _comp_mod->conf->loose_sync))
{
_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;
e_mod_comp_shutdown();
e_mod_comp_init();
}
E_CONFIG_VAL(D, T, texture_from_pixmap, UCHAR);
E_CONFIG_VAL(D, T, lock_fps, UCHAR);
E_CONFIG_VAL(D, T, efl_sync, UCHAR);
+ E_CONFIG_VAL(D, T, loose_sync, UCHAR);
+ E_CONFIG_VAL(D, T, grab, UCHAR);
mod->conf = e_config_domain_load("module.comp", mod->conf_edd);
if (!mod->conf)
mod->conf->texture_from_pixmap = 0;
mod->conf->lock_fps = 1;
mod->conf->efl_sync = 1;
+ mod->conf->loose_sync = 0;
+ mod->conf->grab = 0;
}
_comp_mod = mod;
int engine;
unsigned char texture_from_pixmap;
unsigned char lock_fps;
+ unsigned char loose_sync;
unsigned char efl_sync;
+ unsigned char grab;
};
struct _Mod