Enlightenment CVS committal

Author  : xcomputerman
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        ecore_x_dnd.c ecore_x_events.c ecore_x_private.h 


Log Message:
Xdnd: Handle drag motion events and check that status rectangle

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_dnd.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ecore_x_dnd.c       24 Oct 2004 03:58:11 -0000      1.8
+++ ecore_x_dnd.c       24 Oct 2004 05:52:07 -0000      1.9
@@ -197,8 +197,8 @@
       }
 
       /* FIXME: Handle box information */
-      if (!_xdnd->await_status)
-      {
+      /*if (!_xdnd->await_status)
+      {*/
          xev.xclient.window = win;
          xev.xclient.message_type = _ecore_x_atom_xdnd_position;
          xev.xclient.data.l[0] = _xdnd->source;
@@ -208,7 +208,7 @@
          xev.xclient.data.l[4] = _xdnd->action; /* Version 2, Needs to be pre-set */
          XSendEvent(_ecore_x_disp, win, False, 0, &xev);
          _xdnd->await_status = 1;
-      }
+      /*}*/
    }
 
    if (_xdnd->state == ECORE_X_DND_DROPPED)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- ecore_x_events.c    19 Oct 2004 16:50:02 -0000      1.34
+++ ecore_x_events.c    24 Oct 2004 05:52:07 -0000      1.35
@@ -419,7 +419,9 @@
 void
 _ecore_x_event_handle_motion_notify(XEvent *xevent)
 {
-   Ecore_X_Event_Mouse_Move *e;
+   Ecore_X_Event_Mouse_Move     *e;
+   int                          x1, x2, y1, y2;
+   Ecore_X_DND_Protocol         *_xdnd;
 
    e = calloc(1, sizeof(Ecore_X_Event_Mouse_Move));
    if (!e) return;
@@ -436,6 +438,23 @@
    _ecore_x_event_last_win = e->win;
    _ecore_x_event_last_root_x = e->root.x;
    _ecore_x_event_last_root_y = e->root.y;
+
+   /* Xdnd handling */
+   _xdnd = _ecore_x_dnd_protocol_get();
+   if (_xdnd->state == ECORE_X_DND_DRAGGING)
+   {
+      /* Determine if we're still in the rectangle from the last status */
+      x1 = _xdnd->rectangle.x;
+      x2 = _xdnd->rectangle.x + _xdnd->rectangle.width;
+      y1 = _xdnd->rectangle.y;
+      y2 = _xdnd->rectangle.y + _xdnd->rectangle.height;
+      if (e->win != _xdnd->dest || e->root.x < x1 || e->root.x > x2
+          || e->root.y < y1 || e->root.y > y2)
+      {
+         _ecore_x_dnd_drag(e->root.x, e->root.y);
+      }
+   }
+   
    ecore_event_add(ECORE_X_EVENT_MOUSE_MOVE, e, NULL, NULL);
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_private.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ecore_x_private.h   23 Oct 2004 14:26:25 -0000      1.29
+++ ecore_x_private.h   24 Oct 2004 05:52:07 -0000      1.30
@@ -277,4 +277,6 @@
 
 void _ecore_x_dnd_init(void);
 Ecore_X_DND_Protocol * _ecore_x_dnd_protocol_get(void);
+void _ecore_x_dnd_drag(int x, int y);
+
 #endif




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to