feature: allow moveresize visuals to be replaced
the existing moveresize popup infrastructure is very limiting in that it requires you to create a popup. if you don't want to create a popup, now you don't have to.
This commit is contained in:
parent
b0c6366203
commit
9150cf6812
|
@ -13,6 +13,8 @@ static Evas_Object *_disp_content = NULL;
|
||||||
static Eina_List *hooks = NULL;
|
static Eina_List *hooks = NULL;
|
||||||
static int visible = 0;
|
static int visible = 0;
|
||||||
|
|
||||||
|
static Eina_Bool _e_moveresize_enabled = EINA_TRUE;
|
||||||
|
|
||||||
EINTERN int
|
EINTERN int
|
||||||
e_moveresize_init(void)
|
e_moveresize_init(void)
|
||||||
{
|
{
|
||||||
|
@ -42,9 +44,17 @@ e_moveresize_shutdown(void)
|
||||||
EINA_LIST_FREE(hooks, h)
|
EINA_LIST_FREE(hooks, h)
|
||||||
e_client_hook_del(h);
|
e_client_hook_del(h);
|
||||||
|
|
||||||
|
_e_moveresize_enabled = EINA_TRUE;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_moveresize_replace(Eina_Bool enable)
|
||||||
|
{
|
||||||
|
_e_moveresize_enabled = !enable;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_resize_begin(void *data __UNUSED__, E_Client *ec)
|
_e_resize_begin(void *data __UNUSED__, E_Client *ec)
|
||||||
{
|
{
|
||||||
|
@ -56,7 +66,7 @@ _e_resize_begin(void *data __UNUSED__, E_Client *ec)
|
||||||
if (_disp_obj) evas_object_hide(_disp_obj);
|
if (_disp_obj) evas_object_hide(_disp_obj);
|
||||||
E_FREE_FUNC(_disp_obj, evas_object_del);
|
E_FREE_FUNC(_disp_obj, evas_object_del);
|
||||||
|
|
||||||
if (!e_config->resize_info_visible)
|
if ((!e_config->resize_info_visible) || (!_e_moveresize_enabled))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_e_resize_client_extents(ec, &w, &h);
|
_e_resize_client_extents(ec, &w, &h);
|
||||||
|
@ -165,7 +175,7 @@ _e_move_begin(void *data __UNUSED__, E_Client *ec)
|
||||||
}
|
}
|
||||||
_disp_obj = NULL;
|
_disp_obj = NULL;
|
||||||
|
|
||||||
if (!e_config->move_info_visible)
|
if ((!e_config->move_info_visible) || (!_e_moveresize_enabled))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_disp_content = o = edje_object_add(e_comp_get(ec)->evas);
|
_disp_content = o = edje_object_add(e_comp_get(ec)->evas);
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
|
|
||||||
EINTERN int e_moveresize_init(void);
|
EINTERN int e_moveresize_init(void);
|
||||||
EINTERN int e_moveresize_shutdown(void);
|
EINTERN int e_moveresize_shutdown(void);
|
||||||
|
EAPI void e_moveresize_replace(Eina_Bool enable);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue