Enlightenment CVS committal Author : lordchaos Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_embed.c Log Message: * Set the last.clicked at the end of the mouse_down function - we want mouse_down_feed to have final say about which widget is last clicked, this eliminates the possibility that one of the callbacks called can alter this (menu was an example of this). * On emebed_active_set, clean up EWL_FLAG_STATE_PRESSED for parents of last.clicked, as well as last.clicked itself. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_embed.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -3 -r1.40 -r1.41 --- ewl_embed.c 7 Jan 2006 05:26:49 -0000 1.40 +++ ewl_embed.c 7 Jan 2006 07:07:33 -0000 1.41 @@ -270,6 +270,9 @@ if (e && e->last.clicked) { + Ewl_Widget* temp; + + ewl_object_state_remove(EWL_OBJECT(e->last.clicked), EWL_FLAG_STATE_FOCUSED); ewl_object_state_remove(EWL_OBJECT(e->last.clicked), @@ -277,6 +280,18 @@ ewl_callback_call(e->last.clicked, EWL_CALLBACK_FOCUS_OUT); + /*Clean the last.clicked up recursively..*/ + temp = e->last.clicked; + while (temp) { + if (!(ewl_object_state_has(EWL_OBJECT(temp), + EWL_FLAG_STATE_DISABLED))) { + ewl_object_state_remove(EWL_OBJECT(temp), + EWL_FLAG_STATE_PRESSED); + + } + temp = temp->parent; + } + e->last.clicked = NULL; } @@ -519,6 +534,7 @@ EWL_FLAG_STATE_DISABLED))) { ewl_object_state_add(EWL_OBJECT(temp), EWL_FLAG_STATE_PRESSED); + ewl_callback_call_with_event_data(temp, EWL_CALLBACK_MOUSE_DOWN, &ev); @@ -551,6 +567,8 @@ } } + embed->last.clicked = widget; + DLEAVE_FUNCTION(DLEVEL_STABLE); } ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs