use even more accurate wl callbacks for detecting ssd mouse in/out events

ensure that any wl client with ssd hits the ssd mouse eventing path
This commit is contained in:
Mike Blumenkrantz 2017-03-17 13:17:02 -04:00
parent d23584856e
commit a47a9a73a1
2 changed files with 28 additions and 26 deletions

View File

@ -1017,7 +1017,7 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj)
/////////////////////////////////////////////
static void
_e_comp_object_internal_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
_e_comp_object_ssd_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
E_Comp_Object *cw = data;
@ -1025,7 +1025,7 @@ _e_comp_object_internal_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *o
}
static void
_e_comp_object_internal_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
_e_comp_object_ssd_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
E_Comp_Object *cw = data;
@ -1760,11 +1760,7 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
evas_object_name_set(cw->obj, "cw->obj");
evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888);
_e_comp_object_alpha_set(cw);
if (cw->ec->internal)
{
evas_object_event_callback_add(cw->obj, EVAS_CALLBACK_MOUSE_IN, _e_comp_object_internal_mouse_in, cw);
evas_object_event_callback_add(cw->obj, EVAS_CALLBACK_MOUSE_OUT, _e_comp_object_internal_mouse_out, cw);
}
#ifdef BORDER_ZOOMAPS
e_comp_object_zoomap_set(o, 1);
#else
@ -3436,6 +3432,16 @@ reshadow:
}
else
cw->frame_extends = 0;
if (pbg && (!cw->frame_object))
{
evas_object_event_callback_del(cw->obj, EVAS_CALLBACK_MOUSE_IN, _e_comp_object_ssd_mouse_in);
evas_object_event_callback_del(cw->obj, EVAS_CALLBACK_MOUSE_OUT, _e_comp_object_ssd_mouse_out);
}
else
{
evas_object_event_callback_add(cw->obj, EVAS_CALLBACK_MOUSE_IN, _e_comp_object_ssd_mouse_in, cw);
evas_object_event_callback_add(cw->obj, EVAS_CALLBACK_MOUSE_OUT, _e_comp_object_ssd_mouse_out, cw);
}
evas_object_del(pbg);
return EINA_TRUE;
}

View File

@ -237,13 +237,14 @@ _e_comp_wl_mouse_in(E_Client *ec, Evas_Event_Mouse_In *ev)
}
static void
_e_comp_wl_evas_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
_e_comp_wl_evas_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info)
{
if (e_comp_object_frame_exists(obj)) return;
_e_comp_wl_mouse_in(data, event_info);
}
static void
_e_comp_wl_cb_internal_mouse_in(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
_e_comp_wl_cb_ssd_mouse_in(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
_e_comp_wl_mouse_in(data, event_info);
}
@ -287,11 +288,12 @@ _e_comp_wl_mouse_out(E_Client *ec)
static void
_e_comp_wl_evas_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
if (e_comp_object_frame_exists(obj)) return;
_e_comp_wl_mouse_out(data);
}
static void
_e_comp_wl_cb_internal_mouse_out(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
_e_comp_wl_cb_ssd_mouse_out(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
_e_comp_wl_mouse_out(data);
}
@ -1013,22 +1015,16 @@ _e_comp_wl_client_evas_init(E_Client *ec)
_e_comp_wl_evas_cb_hide, ec);
/* setup input callbacks */
if (ec->internal_elm_win)
{
evas_object_smart_callback_add(ec->frame, "mouse_in",
(Evas_Smart_Cb)_e_comp_wl_cb_internal_mouse_in, ec);
evas_object_smart_callback_add(ec->frame, "mouse_out",
(Evas_Smart_Cb)_e_comp_wl_cb_internal_mouse_out, ec);
}
else
{
evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_IN,
EVAS_CALLBACK_PRIORITY_AFTER,
(Evas_Object_Event_Cb)_e_comp_wl_evas_cb_mouse_in, ec);
evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_OUT,
EVAS_CALLBACK_PRIORITY_AFTER,
(Evas_Object_Event_Cb)_e_comp_wl_evas_cb_mouse_out, ec);
}
evas_object_smart_callback_add(ec->frame, "mouse_in",
(Evas_Smart_Cb)_e_comp_wl_cb_ssd_mouse_in, ec);
evas_object_smart_callback_add(ec->frame, "mouse_out",
(Evas_Smart_Cb)_e_comp_wl_cb_ssd_mouse_out, ec);
evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_IN,
EVAS_CALLBACK_PRIORITY_AFTER,
(Evas_Object_Event_Cb)_e_comp_wl_evas_cb_mouse_in, ec);
evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_OUT,
EVAS_CALLBACK_PRIORITY_AFTER,
(Evas_Object_Event_Cb)_e_comp_wl_evas_cb_mouse_out, ec);
evas_object_event_callback_priority_add(ec->frame, EVAS_CALLBACK_MOUSE_MOVE,
EVAS_CALLBACK_PRIORITY_AFTER,
_e_comp_wl_evas_cb_mouse_move, ec);