Get the focused ec using atomic_load for multi-threading environment.
Change-Id: I7a39fc2fc21a2290d978a210939cd035724accb3
_focus_policy_topmost_focused_ec_get(E_Focus_Policy_Impl *impl)
{
E_Focus_Policy_Topmost *topmost_policy;
+ E_Client *focused_ec = NULL;
topmost_policy = (E_Focus_Policy_Topmost *)impl;
EINA_SAFETY_ON_NULL_RETURN_VAL(topmost_policy, NULL);
- return topmost_policy->focused_ec;
+ focused_ec = atomic_load(&topmost_policy->focused_ec);
+
+ return focused_ec;
}
static Eina_Bool