Enlightenment CVS committal
Author : jethomas
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_embed.c
Log Message:
Oops - committed too soon.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_embed.c,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -3 -r1.135 -r1.136
--- ewl_embed.c 7 Jan 2008 01:01:49 -0000 1.135
+++ ewl_embed.c 7 Jan 2008 01:17:28 -0000 1.136
@@ -560,9 +560,6 @@
while (temp && temp->parent && ewl_widget_internal_is(temp))
temp = temp->parent;
- /* Show widgets as focused */
- ewl_embed_focused_widget_set(embed, temp);
-
/*
* Make sure we set this _BEFORE_ doing the callbacks below because
* the CLICK or DOWN callback may trigger the widget itself to be
@@ -600,6 +597,30 @@
temp = temp->parent;
}
+ /*
+ * Determine whether this widget has already been selected, if not,
+ * deselect the previously selected widget and notify it of the
+ * change. Then select the new widget and notify it of the selection.
+ */
+ if (widget != deselect) {
+ /*
+ * Make sure these widgets haven't been scheduled for
+ * deletion before we send their callbacks.
+ */
+ if (deselect && !DESTROYED(deselect) &&
+ !ewl_widget_parent_of(deselect, widget)) {
+ ewl_object_state_remove(EWL_OBJECT(deselect),
+ EWL_FLAG_STATE_FOCUSED);
+ ewl_callback_call(deselect, EWL_CALLBACK_FOCUS_OUT);
+ }
+
+ if (widget && !DISABLED(widget) && !DESTROYED(widget)) {
+ ewl_object_state_add(EWL_OBJECT(widget),
+ EWL_FLAG_STATE_FOCUSED);
+ ewl_callback_call(widget, EWL_CALLBACK_FOCUS_IN);
+ }
+ }
+
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -1513,29 +1534,13 @@
DCHECK_TYPE(embed, EWL_EMBED_TYPE);
DCHECK_TYPE(w, EWL_WIDGET_TYPE);
- /*
- * Determine whether this widget has already been selected, if not,
- * deselect the previously selected widget and notify it of the
- * change. Then select the new widget and notify it of the selection.
- */
- if (embed->last.focused && (embed->last.focused != w) &&
- !DESTROYED(embed->last.focused) &&
- !ewl_widget_parent_of(embed->last.focused, w))
- {
- ewl_object_state_remove(EWL_OBJECT(embed->last.focused),
- EWL_FLAG_STATE_FOCUSED);
+ if (embed->last.focused && (embed->last.focused != w))
ewl_callback_call(embed->last.focused, EWL_CALLBACK_FOCUS_OUT);
- }
embed->last.focused = w;
- if (embed->last.focused && !DISABLED(embed->last.focused) &&
- !DESTROYED(embed->last.focused))
- {
- ewl_object_state_add(EWL_OBJECT(embed->last.focused),
- EWL_FLAG_STATE_FOCUSED);
+ if (embed->last.focused)
ewl_callback_call(embed->last.focused, EWL_CALLBACK_FOCUS_IN);
- }
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs