src/bin/windowmgr/services/e_service_taskbar.c \
src/bin/windowmgr/services/e_service_kvm.c \
src/bin/windowmgr/e_policy.c \
+src/bin/windowmgr/e_policy_zone.c \
+src/bin/windowmgr/e_policy_desk.c \
+src/bin/windowmgr/e_policy_desk_area.c \
src/bin/windowmgr/e_policy_stack.c \
src/bin/windowmgr/e_policy_visibility.c \
src/bin/windowmgr/e_policy_conformant.c \
#include "e_view_intern.h"
#include "e_view_edje_intern.h"
+#ifdef CONTAINER_POLICY
+#include "e_policy_zone_intern.h"
+#endif
+
static Eina_List *handlers;
static Eina_Bool _ev_freeze = EINA_FALSE;
+#ifdef CONTAINER_POLICY
+static Eina_List *g_policy_zones;
+#endif
+
static void
_e_comp_canvas_render_post(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
{
int color[4] = {0, 0, 0, 255};
E_Zone *zone;
E_Tizen_Screen *tizen_screen;
+#ifdef CONTAINER_POLICY
+ E_Policy_Zone *policy_zone;
+#endif
TRACE_DS_BEGIN(COMP_CANVAS:INIT);
EINA_LIST_FOREACH(screens, l, scr)
{
zone = e_zone_screen_new(scr->screen, scr->w, scr->h);
+#ifdef CONTAINER_POLICY
+ policy_zone = e_policy_zone_new(zone);
+ g_policy_zones = eina_list_append(g_policy_zones, policy_zone);
+#endif
tizen_screen = e_tizen_screen_create(zone);
if (scr->id) zone->output_id = strdup(scr->id);
printf("@@@ NEW ZONE = %p, %p\n", zone, tizen_screen);
else
{
zone = e_zone_screen_new(0, e_comp->w, e_comp->h);
+#ifdef CONTAINER_POLICY
+ policy_zone = e_policy_zone_new(zone);
+ g_policy_zones = eina_list_append(g_policy_zones, policy_zone);
+#endif
tizen_screen = e_tizen_screen_create(zone);
printf("@@@ NEW ZONE = %p, %p\n", zone, tizen_screen);
}
E_Tizen_Screen *tizen_screen;
E_Screen *scr;
Eina_Bool changed = EINA_FALSE;
+#ifdef CONTAINER_POLICY
+ E_Policy_Zone *policy_zone;
+#endif
screens = (Eina_List *)e_comp_screen_e_screens_get(e_comp_screen_get());
else
{
zone = e_zone_screen_new(scr->screen, scr->w, scr->h);
+#ifdef CONTAINER_POLICY
+ policy_zone = e_policy_zone_new(zone);
+ g_policy_zones = eina_list_append(g_policy_zones, policy_zone);
+#endif
tizen_screen = e_tizen_screen_create(zone);
if (scr->id) zone->output_id = strdup(scr->id);
#include <Ecore.h>
#include <Eina.h>
+#define CONTAINER_POLICY
+
#define CHECKING_PRIMARY_ZPOS
#define CLIENT_DEL_STACK_ISSUE
#include "e_policy_stack_intern.h"
#include "e_compositor_intern.h"
+#ifdef CONTAINER_POLICY
+#include "e_policy_desk_intern.h"
+#endif
+
E_Policy *e_policy = NULL;
Eina_Hash *hash_policy_desks = NULL;
Eina_Hash *hash_policy_clients = NULL;
pc->flt_policy_state = EINA_FALSE;
}
+#ifdef CONTAINER_POLICY
+EINTERN E_Config_Policy_Desk *
+#else
E_Config_Policy_Desk *
+#endif
_e_policy_desk_get_by_num(unsigned int zone_num, int x, int y)
{
Eina_List *l;
e_policy_init(void)
{
E_Policy *pol;
+#ifdef CONTAINER_POLICY
+#else
E_Zone *zone;
E_Config_Policy_Desk *d;
const Eina_List *l;
int i, n;
-
+#endif
pol = E_NEW(E_Policy, 1);
EINA_SAFETY_ON_NULL_RETURN_VAL(pol, EINA_FALSE);
e_policy_wl_init();
e_policy_wl_aux_hint_init();
+#ifdef CONTAINER_POLICY
+#else
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
n = zone->desk_y_count * zone->desk_x_count;
e_policy_desk_add(zone->desks[i]);
}
}
+#endif
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_ADD, _e_policy_cb_zone_add, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DEL, _e_policy_cb_zone_del, NULL);
--- /dev/null
+#include "e_policy_desk_intern.h"
+
+#ifdef CONTAINER_POLICY
+
+
+
+#endif
+
--- /dev/null
+#include "e_policy_desk_area_intern.h"
+
+#ifdef CONTAINER_POLICY
+
+struct _E_Policy_Desk_Area
+{
+ E_Desk_Area *desk_area;
+};
+
+#endif
--- /dev/null
+#ifndef E_POLICY_DESK_AREA_INTERN_H
+#define E_POLICY_DESK_AREA_INTERN_H
+
+#include "e_intern.h"
+#include "e_desk_area_intern.h"
+
+#endif
--- /dev/null
+#ifndef E_POLICY_DESK_INTERN_H
+#define E_POLICY_DESK_INTERN_H
+
+#include "e_intern.h"
+#include "e_desk_intern.h"
+
+typedef struct _E_Policy_Desk E_Policy_Desk;
+
+#ifdef CONTAINER_POLICY
+struct _E_Policy_Desk
+{
+ E_Desk *desk;
+ E_Zone *zone;
+};
+#endif
+
+#endif
#include "e_intern.h"
#include "e_policy.h"
+#ifdef CONTAINER_POLICY
+#include "e_policy_desk_intern.h"
+#endif
typedef struct _E_Policy E_Policy;
+#ifdef CONTAINER_POLICY
+#else
typedef struct _E_Policy_Desk E_Policy_Desk;
+#endif
typedef struct _E_Policy_Client E_Policy_Client;
typedef struct _E_Policy_System_Info E_Policy_System_Info;
Eina_Inlist *softkeys; /* softkey ui object per zone */
};
+#ifdef CONTAINER_POLICY
+#else
struct _E_Policy_Desk
{
E_Desk *desk;
E_Zone *zone;
};
+#endif
struct _E_Policy_Client
{
EINTERN void e_policy_interceptors_clean(void);
EINTERN Eina_Bool e_policy_interceptor_call(E_Policy_Intercept_Point ipoint, E_Client *ec, ...);
+#ifdef CONTAINER_POLICY
+EINTERN E_Config_Policy_Desk *_e_policy_desk_get_by_num(unsigned int zone_num, int x, int y);
+#endif
+
#endif
--- /dev/null
+#include "e_policy_zone_intern.h"
+#include "e_policy_intern.h"
+
+#ifdef CONTAINER_POLICY
+
+struct _E_Policy_Zone
+{
+ E_Zone *zone;
+
+ struct wl_listener zone_destroy;
+};
+
+static void
+_e_policy_zone_cb_zone_destroy(struct wl_listener *listener, void *data)
+{
+ E_Policy_Zone *policy_zone;
+
+ policy_zone = wl_container_of(listener, policy_zone, zone_destroy);
+
+ e_object_unref(E_OBJECT(policy_zone->zone));
+ policy_zone->zone = NULL;
+}
+
+EINTERN E_Policy_Zone *
+e_policy_zone_new(E_Zone *zone)
+{
+ E_Policy_Zone *policy_zone;
+ E_Config_Policy_Desk *d;
+ int n, i;
+
+ policy_zone = E_NEW(E_Policy_Zone, 1);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(policy_zone, NULL);
+ policy_zone->zone = zone;
+ e_object_ref(E_OBJECT(zone));
+
+ n = zone->desk_y_count * zone->desk_x_count;
+ for (i = 0; i < n; i++)
+ {
+ if (e_config->use_configured_desks)
+ {
+ d = _e_policy_desk_get_by_num(zone->num,
+ zone->desks[i]->x,
+ zone->desks[i]->y);
+ if (d)
+ e_policy_desk_add(zone->desks[i]);
+ }
+ else
+ e_policy_desk_add(zone->desks[i]);
+ }
+
+ // zone listeners
+ policy_zone->zone_destroy.notify = _e_policy_zone_cb_zone_destroy;
+ e_zone_destroy_listener_add(zone, &policy_zone->zone_destroy);
+
+ return policy_zone;
+}
+
+#endif
--- /dev/null
+#ifndef E_POLICY_ZONE_INTERN_H
+#define E_POLICY_ZONE_INTERN_H
+
+#include "e_intern.h"
+#include "e_zone_intern.h"
+
+typedef struct _E_Policy_Zone E_Policy_Zone;
+
+E_Policy_Zone *e_policy_zone_new(E_Zone *zone);
+
+#endif