Enlightenment CVS committal

Author  : jethomas
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_embed.c 


Log Message:
Can't use either last.focused or last.clicked in every case.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_embed.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -3 -r1.138 -r1.139
--- ewl_embed.c 9 Jan 2008 02:00:13 -0000       1.138
+++ ewl_embed.c 10 Jan 2008 01:27:50 -0000      1.139
@@ -553,6 +553,14 @@
         * causes the widget to be destroyed.
         */
        deselect = embed->last.focused;
+       temp = embed->last.clicked;
+
+       /* There is container_callback_notify, but nothing for reverse situation
+        * so if the last clicked is a child of the last focused then we use the
+        * lower widget
+        */
+       if (deselect && temp && ewl_widget_parent_of(deselect, temp))
+               deselect = embed->last.clicked;
 
        /* we want the focused and last clicked to be the parent widget, not
         * the internal children */
@@ -1538,7 +1546,17 @@
        DCHECK_TYPE(w, EWL_WIDGET_TYPE);
 
        if (embed->last.focused && (embed->last.focused != w))
+       {
+               /* We might set an internal widget focused during
+                * mouse_down_feed, so we need to check if the last clicked is
+                * a child.  If so, it needs to get the unfocus callback
+                * instead of parent
+                */
+               if (ewl_widget_parent_of(embed->last.focused, 
embed->last.clicked))
+                               embed->last.focused = embed->last.clicked;
+
                ewl_callback_call(embed->last.focused, EWL_CALLBACK_FOCUS_OUT);
+       }
 
        embed->last.focused = w;
 



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to