focus - fix emacs buffer switch focus set reported by felipe

emacs window (not in terminal). now in one:
ctrl+x 5 2 <- open new buffer

now we have it try switch to the other buffer:
ctrl+x 5 o

broken ... now fixed.

@fix
This commit is contained in:
Carsten Haitzler 2020-04-15 18:04:49 +01:00
parent 1edddcda66
commit 690ab94c06
1 changed files with 12 additions and 3 deletions

View File

@ -3129,7 +3129,16 @@ _e_comp_x_focus_in(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_W
/* should be equal, maybe some clients don't reply with the proper timestamp ? */
if (ev->time >= focus_time)
{
if (!evas_object_focus_get(ec->frame))
{
evas_object_focus_set(ec->frame, 1);
if (!e_client_focus_policy_click(ec))
e_client_pointer_warp_to_center_now(ec);
}
else
evas_object_focus_set(ec->frame, 1);
}
/* handle case of someone trying to benchmark focus handling */
if ((!e_client_focus_policy_click(ec)) && (focused && (!e_client_focus_policy_click(focused))) &&
(ev->time - focus_time <= 2))
@ -4901,7 +4910,7 @@ _e_comp_x_hook_client_focus_set(void *d EINA_UNUSED, E_Client *ec)
}
if (ec->override) return;
focus_job_client = ec;
if (!focus_job)
if (focus_job) ecore_job_del(focus_job);
focus_job = ecore_job_add(_e_comp_x_hook_client_focus_set_job, NULL);
}