forked from enlightenment/enlightenment
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:
parent
3647c07cc5
commit
c9ddd75705
|
@ -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_edd = NULL;
|
||||||
static E_Config_DD *conf_item_edd = NULL;
|
static E_Config_DD *conf_item_edd = NULL;
|
||||||
|
|
||||||
|
static Ecore_Timer *task_refill_timer;
|
||||||
|
|
||||||
Config *tasks_config = NULL;
|
Config *tasks_config = NULL;
|
||||||
|
|
||||||
/* module setup */
|
/* module setup */
|
||||||
|
@ -439,12 +441,31 @@ _tasks_refill(Tasks *tasks)
|
||||||
e_gadcon_client_min_size_set(tasks->gcc, 0, 0);
|
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
|
static void
|
||||||
_tasks_refill_all(void)
|
_tasks_refill_all(void)
|
||||||
{
|
{
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
Tasks *tasks;
|
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)
|
EINA_LIST_FOREACH(tasks_config->tasks, l, tasks)
|
||||||
{
|
{
|
||||||
_tasks_refill(tasks);
|
_tasks_refill(tasks);
|
||||||
|
|
Loading…
Reference in New Issue