forked from enlightenment/enlightenment
* Allow the E_EVENT_FOCUS_IN/OUT to be sent iff the focus is set explicitly.
Otherwise, the event is set on each focus callback, not even if the border already has focus. * Do not like autoapply in keybinding dialog. :) SVN revision: 22926
This commit is contained in:
parent
9cbe86aeb1
commit
6e06ed9318
|
@ -1291,12 +1291,17 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
|||
focused = bd;
|
||||
//printf("set focused to %p\n", focused);
|
||||
|
||||
ev = calloc(1, sizeof(E_Event_Border_Focus_In));
|
||||
ev->border = bd;
|
||||
e_object_ref(E_OBJECT(bd));
|
||||
|
||||
ecore_event_add(E_EVENT_BORDER_FOCUS_IN, ev,
|
||||
_e_border_event_border_focus_in_free, NULL);
|
||||
if (focus && set)
|
||||
{
|
||||
// Let send the focus event iff the focus is set explicitly,
|
||||
// not via callback
|
||||
ev = calloc(1, sizeof(E_Event_Border_Focus_In));
|
||||
ev->border = bd;
|
||||
e_object_ref(E_OBJECT(bd));
|
||||
|
||||
ecore_event_add(E_EVENT_BORDER_FOCUS_IN, ev,
|
||||
_e_border_event_border_focus_in_free, NULL);
|
||||
}
|
||||
}
|
||||
else if ((!bd->focused) && (focused == bd))
|
||||
{
|
||||
|
@ -1304,13 +1309,18 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
|||
|
||||
focused = NULL;
|
||||
//printf("set focused to %p\n", focused);
|
||||
|
||||
ev = calloc(1, sizeof(E_Event_Border_Focus_Out));
|
||||
ev->border = bd;
|
||||
e_object_ref(E_OBJECT(bd));
|
||||
|
||||
ecore_event_add(E_EVENT_BORDER_FOCUS_OUT, ev,
|
||||
_e_border_event_border_focus_out_free, NULL);
|
||||
if (set)
|
||||
{
|
||||
// Let send the focus event iff the focus is set explicitly,
|
||||
// not via callback
|
||||
ev = calloc(1, sizeof(E_Event_Border_Focus_Out));
|
||||
ev->border = bd;
|
||||
e_object_ref(E_OBJECT(bd));
|
||||
|
||||
ecore_event_add(E_EVENT_BORDER_FOCUS_OUT, ev,
|
||||
_e_border_event_border_focus_out_free, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -311,7 +311,7 @@ e_int_config_keybindings(E_Container *con)
|
|||
v->free_cfdata = _free_data;
|
||||
v->basic.apply_cfdata = _basic_apply_data;
|
||||
v->basic.create_widgets = _basic_create_widgets;
|
||||
//v->override_auto_apply = 1;
|
||||
v->override_auto_apply = 1;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Key Binding Settings"), NULL, 0, v, NULL);
|
||||
return cfd;
|
||||
|
|
Loading…
Reference in New Issue