summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl/efl_wl.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:11:00 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:10:49 -0400
commit106e1d4318e65fb745a9c5c0e5fe4143b9986762 (patch)
tree955d47846348122cbf3959f590e92b4f9399b802 /src/lib/efl_wl/efl_wl.c
parent514fefe2d46ef6a1fb97ed10a39b0771ddccd962 (diff)
efl-wl: set cursor surface roles
ensure cursor surfaces without buffers will be mapped if a buffer is attached @fix
Diffstat (limited to 'src/lib/efl_wl/efl_wl.c')
-rw-r--r--src/lib/efl_wl/efl_wl.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 111e244442..03e1128836 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -3659,7 +3659,7 @@ seat_ptr_set_cursor(struct wl_client *client, struct wl_resource *resource, uint
3659 if (s->ptr.enter_serial - serial > UINT32_MAX / 2) return; 3659 if (s->ptr.enter_serial - serial > UINT32_MAX / 2) return;
3660 if (surface_resource) 3660 if (surface_resource)
3661 cs = wl_resource_get_user_data(surface_resource); 3661 cs = wl_resource_get_user_data(surface_resource);
3662 if (cs && cs->role) 3662 if (cs && cs->role && (!cs->cursor))
3663 { 3663 {
3664 wl_resource_post_error(surface_resource, 3664 wl_resource_post_error(surface_resource,
3665 WL_POINTER_ERROR_ROLE, "surface already has role"); 3665 WL_POINTER_ERROR_ROLE, "surface already has role");
@@ -3686,7 +3686,10 @@ seat_ptr_set_cursor(struct wl_client *client, struct wl_resource *resource, uint
3686 seat_ptr_inherit(s, dev); 3686 seat_ptr_inherit(s, dev);
3687 ecore_evas_cursor_device_unset(ee, dev); 3687 ecore_evas_cursor_device_unset(ee, dev);
3688 if (cs) 3688 if (cs)
3689 ecore_evas_object_cursor_device_set(ee, dev, cs->obj, EVAS_LAYER_MAX, x, y); 3689 {
3690 cs->role = cs->res;
3691 ecore_evas_object_cursor_device_set(ee, dev, cs->obj, EVAS_LAYER_MAX, x, y);
3692 }
3690 } 3693 }
3691 } 3694 }
3692 if (cs) 3695 if (cs)
@@ -4774,9 +4777,10 @@ comp_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
4774 seat_ptr_inherit(s, ev->dev); 4777 seat_ptr_inherit(s, ev->dev);
4775 ecore_evas_cursor_device_unset(ecore_evas_ecore_evas_get(e), ev->dev); 4778 ecore_evas_cursor_device_unset(ecore_evas_ecore_evas_get(e), ev->dev);
4776 if (s->ptr.efl.obj) evas_object_hide(s->ptr.efl.obj); 4779 if (s->ptr.efl.obj) evas_object_hide(s->ptr.efl.obj);
4777 if (s->ptr.cursor.surface) 4780 if (!s->ptr.cursor.surface) return;
4778 ecore_evas_object_cursor_device_set(ecore_evas_ecore_evas_get(e), ev->dev, 4781 s->ptr.cursor.surface->role = s->ptr.cursor.surface->res;
4779 s->ptr.cursor.surface->obj, EVAS_LAYER_MAX, s->ptr.cursor.x, s->ptr.cursor.y); 4782 ecore_evas_object_cursor_device_set(ecore_evas_ecore_evas_get(e), ev->dev,
4783 s->ptr.cursor.surface->obj, EVAS_LAYER_MAX, s->ptr.cursor.x, s->ptr.cursor.y);
4780} 4784}
4781 4785
4782static void 4786static void
@@ -4833,7 +4837,11 @@ comp_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_in
4833 s->ptr.efl.obj, s->ptr.efl.layer, s->ptr.efl.x, s->ptr.efl.y); 4837 s->ptr.efl.obj, s->ptr.efl.layer, s->ptr.efl.x, s->ptr.efl.y);
4834 seat_ptr_del(s, NULL, NULL, NULL); 4838 seat_ptr_del(s, NULL, NULL, NULL);
4835 } 4839 }
4836 if (s->ptr.cursor.surface) evas_object_hide(s->ptr.cursor.surface->obj); 4840 if (s->ptr.cursor.surface)
4841 {
4842 s->ptr.cursor.surface->role = NULL;
4843 evas_object_hide(s->ptr.cursor.surface->obj);
4844 }
4837 if ((!s->drag.res) || (!s->drag.source) || s->drag.source->proxy) return; 4845 if ((!s->drag.res) || (!s->drag.source) || s->drag.source->proxy) return;
4838 if (s->drag.enter) comp_surface_send_data_device_leave(s->drag.enter, s); 4846 if (s->drag.enter) comp_surface_send_data_device_leave(s->drag.enter, s);
4839 if (s->drag.surface) 4847 if (s->drag.surface)