Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_embed.c 


Log Message:
Fix for DESELECT events never being triggered.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ewl_embed.c 10 Mar 2004 21:19:00 -0000      1.29
+++ ewl_embed.c 22 Mar 2004 21:49:50 -0000      1.30
@@ -311,6 +311,7 @@
        Ewl_Event_Mouse_Down ev;
        Ewl_Widget *temp = NULL;
        Ewl_Widget *widget = NULL;
+       Ewl_Widget *deselect = NULL;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("embed", embed);
@@ -319,11 +320,11 @@
                        x, y);
 
        /*
-        * Save the newly selected widget for further reference, do this prior
+        * Save the last selected widget for further reference, do this prior
         * to triggering the callback to avoid funkiness if the callback
         * causes the widget to be destroyed.
         */
-       temp = last_selected;
+       deselect = last_selected;
        last_key = last_selected = widget;
 
        ev.modifiers = mods;
@@ -361,11 +362,11 @@
         * deselect the previously selected widget and notify it of the
         * change. Then select the new widget and notify it of the selection.
         */
-       if (widget != temp) {
-               if (temp) {
-                       ewl_object_remove_state(EWL_OBJECT(temp),
+       if (widget != deselect) {
+               if (deselect) {
+                       ewl_object_remove_state(EWL_OBJECT(deselect),
                                        EWL_FLAG_STATE_SELECTED);
-                       ewl_callback_call(temp, EWL_CALLBACK_DESELECT);
+                       ewl_callback_call(deselect, EWL_CALLBACK_DESELECT);
                }
 
                if (widget && !(ewl_object_has_state(EWL_OBJECT(widget),




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to