Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_widget.c 


Log Message:
Adjust click callback handling to match new mouse move dispatching.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_widget.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_widget.c        28 Sep 2005 20:32:18 -0000      1.17
+++ ewl_widget.c        2 Oct 2005 07:02:27 -0000       1.18
@@ -1577,9 +1577,20 @@
        ewl_widget_state_set(w, state);
 
        if (ewl_object_state_has(EWL_OBJECT(w), EWL_FLAG_STATE_HILITED)) {
+               int x, y;
+
                ewl_widget_state_set(w, "mouse,in");
-               ewl_callback_call_with_event_data(w, EWL_CALLBACK_CLICKED,
-                                                 ev_data);
+               x = e->x - (CURRENT_X(w) - INSET_LEFT(w));
+               y = e->y - (CURRENT_Y(w) - INSET_TOP(w));
+               if ((x > 0) && (x < CURRENT_W(w) + INSET_HORIZONTAL(w)) &&
+                   (y > 0) && (y < CURRENT_H(w) + INSET_VERTICAL(w))) {
+                       ewl_callback_call_with_event_data(w,
+                                       EWL_CALLBACK_CLICKED, ev_data);
+               }
+               else {
+                       ewl_embed_mouse_move_feed(ewl_embed_widget_find(w),
+                                       e->x, e->y, e->modifiers);
+               }
        } else
                ewl_widget_state_set(w, "mouse,out");
        DLEAVE_FUNCTION(DLEVEL_STABLE);




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to