forked from enlightenment/enlightenment
Luncher/Pager gadgets: Make sure to lock/unlock the gadget site on dnd.
This commit is contained in:
parent
77a0316be9
commit
51772d1596
|
@ -347,6 +347,7 @@ _bar_icon_drag_done(E_Drag *drag, int dropped)
|
||||||
|
|
||||||
efreet_desktop_unref(drag->data);
|
efreet_desktop_unref(drag->data);
|
||||||
if (!inst) return;
|
if (!inst) return;
|
||||||
|
evas_object_smart_callback_call(e_gadget_site_get(inst->o_main), "gadget_site_unlocked", NULL);
|
||||||
if (!dropped)
|
if (!dropped)
|
||||||
bar_recalculate(inst);
|
bar_recalculate(inst);
|
||||||
}
|
}
|
||||||
|
@ -411,6 +412,7 @@ _bar_drag_timer(void *data)
|
||||||
|
|
||||||
ic->drag_timer = NULL;
|
ic->drag_timer = NULL;
|
||||||
ic->drag.start = 1;
|
ic->drag.start = 1;
|
||||||
|
evas_object_smart_callback_call(e_gadget_site_get(ic->inst->o_main), "gadget_site_locked", NULL);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1614,6 +1616,7 @@ _bar_drop_move(void *data, const char *type EINA_UNUSED, void *event_data)
|
||||||
elm_box_unpack(inst->o_icon_con, inst->place_holder);
|
elm_box_unpack(inst->o_icon_con, inst->place_holder);
|
||||||
if (inst->drop_before)
|
if (inst->drop_before)
|
||||||
elm_box_pack_before(inst->o_icon_con, inst->place_holder, inst->drop_before->o_layout);
|
elm_box_pack_before(inst->o_icon_con, inst->place_holder, inst->drop_before->o_layout);
|
||||||
|
_bar_aspect(inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -1034,6 +1034,8 @@ _pager_window_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA
|
||||||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
||||||
if (_pager_check_modifiers(ev->modifiers)) return;
|
if (_pager_check_modifiers(ev->modifiers)) return;
|
||||||
|
|
||||||
|
evas_object_smart_callback_call(e_gadget_site_get(pw->desk->pager->inst->o_pager), "gadget_site_unlocked", NULL);
|
||||||
|
|
||||||
pw->drag.button = 0;
|
pw->drag.button = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1068,6 +1070,7 @@ _pager_window_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EI
|
||||||
pw->drag.start = 1;
|
pw->drag.start = 1;
|
||||||
pw->drag.button = ev->button;
|
pw->drag.button = ev->button;
|
||||||
pw->desk->pager->active_drag_client = pw->client;
|
pw->desk->pager->active_drag_client = pw->client;
|
||||||
|
evas_object_smart_callback_call(e_gadget_site_get(pw->desk->pager->inst->o_pager), "gadget_site_locked", NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1150,6 +1153,7 @@ _pager_window_cb_drag_finished(E_Drag *drag, int dropped)
|
||||||
if (!pw) return;
|
if (!pw) return;
|
||||||
p->active_drag_client = NULL;
|
p->active_drag_client = NULL;
|
||||||
evas_object_show(pw->o_mirror);
|
evas_object_show(pw->o_mirror);
|
||||||
|
evas_object_smart_callback_call(e_gadget_site_get(pw->desk->pager->inst->o_pager), "gadget_site_unlocked", NULL);
|
||||||
if (dropped)
|
if (dropped)
|
||||||
{
|
{
|
||||||
/* be helpful */
|
/* be helpful */
|
||||||
|
@ -1397,6 +1401,7 @@ _pager_desk_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA
|
||||||
pd->drag.x = ev->canvas.x;
|
pd->drag.x = ev->canvas.x;
|
||||||
pd->drag.y = ev->canvas.y;
|
pd->drag.y = ev->canvas.y;
|
||||||
pd->drag.button = ev->button;
|
pd->drag.button = ev->button;
|
||||||
|
evas_object_smart_callback_call(e_gadget_site_get(pd->pager->inst->o_pager), "gadget_site_locked", NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1434,6 +1439,7 @@ _pager_desk_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
|
||||||
if (pd->pager->dragging) pd->pager->dragging = 0;
|
if (pd->pager->dragging) pd->pager->dragging = 0;
|
||||||
pd->drag.start = 0;
|
pd->drag.start = 0;
|
||||||
pd->drag.in_pager = 0;
|
pd->drag.in_pager = 0;
|
||||||
|
evas_object_smart_callback_call(e_gadget_site_get(p->inst->o_pager), "gadget_site_unlocked", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((p->popup) && (p->popup->urgent)) _pager_popup_free(p->popup);
|
if ((p->popup) && (p->popup->urgent)) _pager_popup_free(p->popup);
|
||||||
|
@ -1503,6 +1509,7 @@ _pager_desk_cb_drag_finished(E_Drag *drag, int dropped)
|
||||||
|
|
||||||
pd = drag->data;
|
pd = drag->data;
|
||||||
if (!pd) return;
|
if (!pd) return;
|
||||||
|
evas_object_smart_callback_call(e_gadget_site_get(pd->pager->inst->o_pager), "gadget_site_unlocked", NULL);
|
||||||
if (!dropped)
|
if (!dropped)
|
||||||
{
|
{
|
||||||
/* wasn't dropped on pager, switch with current desktop */
|
/* wasn't dropped on pager, switch with current desktop */
|
||||||
|
|
Loading…
Reference in New Issue