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;
|
focused = bd;
|
||||||
//printf("set focused to %p\n", focused);
|
//printf("set focused to %p\n", focused);
|
||||||
|
|
||||||
ev = calloc(1, sizeof(E_Event_Border_Focus_In));
|
if (focus && set)
|
||||||
ev->border = bd;
|
{
|
||||||
e_object_ref(E_OBJECT(bd));
|
// Let send the focus event iff the focus is set explicitly,
|
||||||
|
// not via callback
|
||||||
ecore_event_add(E_EVENT_BORDER_FOCUS_IN, ev,
|
ev = calloc(1, sizeof(E_Event_Border_Focus_In));
|
||||||
_e_border_event_border_focus_in_free, NULL);
|
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))
|
else if ((!bd->focused) && (focused == bd))
|
||||||
{
|
{
|
||||||
|
@ -1304,13 +1309,18 @@ e_border_focus_set(E_Border *bd, int focus, int set)
|
||||||
|
|
||||||
focused = NULL;
|
focused = NULL;
|
||||||
//printf("set focused to %p\n", focused);
|
//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,
|
if (set)
|
||||||
_e_border_event_border_focus_out_free, NULL);
|
{
|
||||||
|
// 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->free_cfdata = _free_data;
|
||||||
v->basic.apply_cfdata = _basic_apply_data;
|
v->basic.apply_cfdata = _basic_apply_data;
|
||||||
v->basic.create_widgets = _basic_create_widgets;
|
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);
|
cfd = e_config_dialog_new(con, _("Key Binding Settings"), NULL, 0, v, NULL);
|
||||||
return cfd;
|
return cfd;
|
||||||
|
|
Loading…
Reference in New Issue