Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/engines/x11


Modified Files:
        ewl_engine_x11.c 


Log Message:
Send correct status messages on DND position events, and ignore events on
windows that EWL doesn't know about.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/engines/x11/ewl_engine_x11.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ewl_engine_x11.c    8 Sep 2006 07:12:43 -0000       1.13
+++ ewl_engine_x11.c    9 Sep 2006 04:07:51 -0000       1.14
@@ -1081,6 +1081,7 @@
        int x, y, wx, wy;
        int px, py, pw, ph;
        Ecore_X_Rectangle rect;
+       int will_accept = 0;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("e", e, FALSE);
@@ -1102,25 +1103,25 @@
                if (embed) {
                        /* First see if we need to send an 'enter' 
                         * to the widget */
-                       ewl_embed_dnd_position_feed(embed, x, y, &px,
-                                                       &py, &pw, &ph);
+                       if (ewl_embed_dnd_position_feed(embed, x, y, &px,
+                                                       &py, &pw, &ph))
+                               will_accept = 1;
+
+                       if (embed->last.drop_widget) {
+                               rect.x = px;
+                               rect.y = py;
+                               rect.width = pw;
+                               rect.height = ph;
+                       } else {
+                               rect.x = 0;
+                               rect.y = 0;
+                               rect.width = 0;
+                               rect.height = 0;
+                       }
 
-                       /*rect.x = px;
-                       rect.y = py;
-                       rect.width = pw;
-                       rect.height = ph;*/
-
-                       rect.x = 0;
-                       rect.y = 0;
-                       rect.width = 0;
-                       rect.height = 0;
-               } else {
-                       rect.x = 0;
-                       rect.y = 0;
-                       rect.width = 0;
-                       rect.height = 0;
+                       /* Don't send status for windows we don't own */
+                       ecore_x_dnd_send_status(will_accept, 0, rect, 
ECORE_X_DND_ACTION_PRIVATE);
                }
-               ecore_x_dnd_send_status(1, 0, rect, ECORE_X_DND_ACTION_PRIVATE);
        }
 
        DRETURN_INT(TRUE, DLEVEL_STABLE);



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to