fixes sticky cursors 85/47185/2 accepted/tizen/mobile/20150903.000046 accepted/tizen/tv/20150903.000241 accepted/tizen/wearable/20150903.000518 submit/tizen/20150902.122230
authorDuna Oh <duna.oh@samsung.com>
Tue, 1 Sep 2015 01:44:04 +0000 (10:44 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Wed, 2 Sep 2015 12:20:46 +0000 (05:20 -0700)
- Add inside_check condition when gets MOUSE_OUT event
Even though ec->cur_mouse_action is not NULL, check if mouse is out of client and reset the cursor.
- Remove check for ec->mouse.in when get cursor_set.
ec->mouse.in could be FALSE when comp_grabbed is TRUE, then failed to set the client's cursor.
- Show canvas cursor when reset the cursor

Change-Id: I59430fd8c4d1b9fcd19dc6f92f00abb1156697b3
Signed-off-by: Duna Oh <duna.oh@samsung.com>
src/bin/e_comp_wl.c
src/bin/e_comp_wl_input.c
src/bin/e_pointer.c

index 15dd856258931f2f2fba23004ec058557d4de976..f1c776d0cbdbdd4c93177c9d889da6928d37748b 100644 (file)
@@ -666,16 +666,22 @@ _e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj
 }
 
 static void
-_e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
+_e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
 {
    E_Client *ec;
+   Evas_Event_Mouse_Out *ev;
    struct wl_resource *res;
    struct wl_client *wc;
    Eina_List *l;
    uint32_t serial;
+   Eina_Bool inside_check;
+
+   ev = event;
 
    if (!(ec = data)) return;
-   if (ec->cur_mouse_action) return;
+   inside_check = E_INSIDE(ev->canvas.x, ev->canvas.y,
+                          ec->client.x, ec->client.y, ec->client.w, ec->client.h);
+   if (ec->cur_mouse_action && inside_check) return;
    if (e_object_is_del(E_OBJECT(e_comp))) return;
    /* FIXME? this is a hack to just reset the cursor whenever we mouse out. not sure if accurate */
    {
index f99c3c73167dbee8146c2219fc288c0303af842b..b6e611d865c1f9d4b22c9bd5c8c40c8b2ca39eaf 100644 (file)
@@ -70,11 +70,8 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou
      {
        if (!ec->comp_data->surface) continue;
        if (client != wl_resource_get_client(ec->comp_data->surface)) continue;
-       if (ec->mouse.in)
-         {
-           got_mouse = EINA_TRUE;
-           break;
-         }
+       got_mouse = EINA_TRUE;
+       break;
      }
    if (!got_mouse) return;
    if (!surface_resource)
index 6ebecbe860cfe64ebb3231eaed1199f95b86ec74..e21b6e0c33ffdc9fc8e7c4a6cf3a013a5fb9f8cd 100644 (file)
@@ -787,5 +787,8 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y)
         ecore_evas_object_cursor_set(ptr->ee, obj, EVAS_LAYER_MAX, x, y);
      }
    else
-     ecore_evas_object_cursor_set(ptr->ee, ptr->o_ptr, EVAS_LAYER_MAX, ptr->hot.x, ptr->hot.y);
+     {
+        ecore_evas_object_cursor_set(ptr->ee, ptr->o_ptr, EVAS_LAYER_MAX, ptr->hot.x, ptr->hot.y);
+        evas_object_show(ptr->o_ptr);
+     }
 }