block task gadget refills while a drag is active

it's impossible to use a pager effectively with a task gadget due to
the constant resizing of the tasks gadget during any kind of window move
This commit is contained in:
Mike Blumenkrantz 2015-11-19 15:34:19 -05:00
parent 92fd6db69f
commit 42ad1e640a
1 changed files with 21 additions and 0 deletions

View File

@ -91,6 +91,8 @@ static Eina_Bool _tasks_cb_event_client_urgent_change(void *data, int type, v
static E_Config_DD *conf_edd = NULL;
static E_Config_DD *conf_item_edd = NULL;
static Ecore_Timer *task_refill_timer;
Config *tasks_config = NULL;
/* module setup */
@ -439,12 +441,31 @@ _tasks_refill(Tasks *tasks)
e_gadcon_client_min_size_set(tasks->gcc, 0, 0);
}
static Eina_Bool
_refill_timer(void *d EINA_UNUSED)
{
if (e_drag_current_get()) return EINA_TRUE;
_tasks_refill_all();
task_refill_timer = NULL;
return EINA_FALSE;
}
static void
_tasks_refill_all(void)
{
const Eina_List *l;
Tasks *tasks;
if (e_drag_current_get())
{
if (task_refill_timer)
ecore_timer_reset(task_refill_timer);
else
task_refill_timer = ecore_timer_add(0.5, _refill_timer, NULL);
return;
}
EINA_LIST_FOREACH(tasks_config->tasks, l, tasks)
{
_tasks_refill(tasks);