discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=9c3d8aa9ca4285cdd49414a1a01322fc43c440a6

commit 9c3d8aa9ca4285cdd49414a1a01322fc43c440a6
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Mar 31 11:20:19 2016 -0400

    optimize case where an x11 client is focused/unfocused in same loop 
iteration
---
 src/bin/e_comp_x.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index e227638..35831a8 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -4503,6 +4503,11 @@ _e_comp_x_hook_client_focus_unset_job(void *d 
EINA_UNUSED)
 static void
 _e_comp_x_hook_client_focus_unset(void *d EINA_UNUSED, E_Client *ec)
 {
+   if (focus_job_client == ec)
+     {
+        focus_job_client = NULL;
+        E_FREE_FUNC(focus_job, ecore_job_del);
+     }
    unfocus_job_client = ec;
    if (!unfocus_job)
      unfocus_job = ecore_job_add(_e_comp_x_hook_client_focus_unset_job, NULL);
@@ -4542,6 +4547,11 @@ _e_comp_x_hook_client_focus_set_job(void *d EINA_UNUSED)
 static void
 _e_comp_x_hook_client_focus_set(void *d EINA_UNUSED, E_Client *ec)
 {
+   if (unfocus_job_client == ec)
+     {
+        unfocus_job_client = NULL;
+        E_FREE_FUNC(unfocus_job, ecore_job_del);
+     }
    focus_job_client = ec;
    if (!focus_job)
      focus_job = ecore_job_add(_e_comp_x_hook_client_focus_set_job, NULL);

-- 


Reply via email to