static Eina_List *_e_process_ec_handlers = NULL;
static Eina_List *_e_process_ec_hooks = NULL;
+static Eina_List *_e_process_comp_intercept_hooks = NULL;
E_Process_Manager *_e_process_manager;
}
}
+static Eina_Bool
+_e_process_cb_intercept_hide(void *data EINA_UNUSED, E_Client *ec)
+{
+ E_Process *pinfo;
+ pid_t pid;
+ Eina_Bool visible;
+
+ pid = ec->netwm.pid;
+ pinfo = _e_process_find(_e_process_manager, pid);
+ if (!pinfo) goto intercept_hide_done;
+
+ if (ec->visibility.obscured != E_VISIBILITY_FULLY_OBSCURED)
+ goto intercept_hide_done;
+
+ if (pinfo->state == E_PROCESS_STATE_BACKGROUND)
+ goto intercept_hide_done;
+
+ if (_e_process_windows_visible_get(pid, &visible))
+ {
+ if (!visible)
+ {
+ if (!ec->visible)
+ {
+ ELOGF("PROCESS", "Act no visible windows by hide callback. pid:%d", ec, pid);
+ _e_process_windows_act_no_visible_update(pid);
+ }
+ }
+ }
+
+intercept_hide_done:
+ return EINA_TRUE;
+}
+
static Eina_Bool
_e_process_windows_visible_get(pid_t pid, Eina_Bool *visible)
{
hook = e_client_hook_add(E_CLIENT_HOOK_DEL, _e_process_cb_hook_client_del, NULL);
if (hook) _e_process_ec_hooks = eina_list_append(_e_process_ec_hooks, hook);
+ E_Comp_Object_Intercept_Hook *intercept_hook;
+ intercept_hook = e_comp_object_intercept_hook_add(E_COMP_OBJECT_INTERCEPT_HOOK_HIDE, _e_process_cb_intercept_hide, NULL);
+ if (intercept_hook)
+ _e_process_comp_intercept_hooks = eina_list_append(_e_process_comp_intercept_hooks, intercept_hook);
+
_e_process_manager = e_pm;
return EINA_TRUE;
if (!_e_process_manager) return 0;
+ E_FREE_LIST(_e_process_comp_intercept_hooks, e_comp_object_intercept_hook_del);
E_FREE_LIST(_e_process_ec_handlers, ecore_event_handler_del);
EINA_LIST_FREE(_e_process_ec_hooks, hook)
e_client_hook_del(hook);