fix over/under grab problems
authorCarsten Haitzler <raster@rasterman.com>
Wed, 19 Apr 2006 14:37:49 +0000 (14:37 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Wed, 19 Apr 2006 14:37:49 +0000 (14:37 +0000)
SVN revision: 22234

legacy/evas/src/lib/canvas/evas_events.c
legacy/evas/src/lib/canvas/evas_object_main.c

index 10b1ab8..8f915a6 100644 (file)
@@ -297,8 +297,10 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
        Evas_Event_Mouse_Up ev;
 
        obj = l->data;
-       if (obj->mouse_grabbed > 0) obj->mouse_grabbed--;
-       if (e->pointer.mouse_grabbed > 0) e->pointer.mouse_grabbed--;
+//     if (obj->mouse_grabbed > 0) 
+         obj->mouse_grabbed--;
+//     if (e->pointer.mouse_grabbed > 0) 
+         e->pointer.mouse_grabbed--;
        ev.button = b;
        ev.output.x = e->pointer.x;
        ev.output.y = e->pointer.y;
@@ -460,7 +462,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
    e->pointer.canvas_y = evas_coord_screen_y_to_world(e, y);
    if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return;
    /* if our mouse button is grabbed to any objects */
-   if (e->pointer.mouse_grabbed != 0)
+   if (e->pointer.mouse_grabbed > 0)
      {
        /* go thru old list of in objects */
        Evas_List *outs = NULL;
index d6d0ba2..3232088 100644 (file)
@@ -698,7 +698,7 @@ evas_object_hide(Evas_Object *obj)
                  if (obj->delete_me) return;
                  if (obj->mouse_grabbed > 0)
                    {
-                      if (obj->layer->evas->pointer.mouse_grabbed >= obj->mouse_grabbed)
+//                    if (obj->layer->evas->pointer.mouse_grabbed >= obj->mouse_grabbed)
                         obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
                    }
                    {