if (!ec) return ECORE_CALLBACK_PASS_ON;
pid = ec->netwm.pid;
- if (pid <= 0) return ECORE_CALLBACK_PASS_ON;
+ if (pid <= 0)
+ {
+ if (ec->internal)
+ {
+ ELOGF("PROCESS", "FOCUS is set to internal window. Check deactivate process", ec);
+ goto check_deactivate;
+ }
+ return ECORE_CALLBACK_PASS_ON;
+ }
pinfo = _e_process_find(_e_process_manager, pid);
if (!pinfo)
}
return ECORE_CALLBACK_PASS_ON;
+
+check_deactivate:
+ ec_deactive = _e_process_manager->active_win;
+ _e_process_manager->active_win = ec;
+
+ if (ec_deactive)
+ {
+ pinfo_deactive = _e_process_find(_e_process_manager, ec_deactive->netwm.pid);
+ if (pinfo_deactive)
+ {
+ ELOGF("PROCESS", "ACTION DEACTIVATE (just). PID:%d", NULL, pinfo_deactive->pid);
+ _e_process_action_change(pinfo_deactive, E_PROCESS_ACT_DEACTIVATE);
+ }
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
}
static void