E_POLICY_HINT_DECORATION_SIZE_FOOTER = 16,
E_POLICY_HINT_VISIBILITY_IGNORE_GEOMETRY= 17,
E_POLICY_HINT_RESIZE_PPU = 18,
- E_POLICY_HINT_DECORATION_SIZE_SHADOW = 19,
+ E_POLICY_HINT_DECORATION_SIZE_SHADOW_TOP = 19,
+ E_POLICY_HINT_DECORATION_SIZE_SHADOW_BOTTOM = 20,
+ E_POLICY_HINT_DECORATION_SIZE_SHADOW_LEFT = 21,
+ E_POLICY_HINT_DECORATION_SIZE_SHADOW_RIGHT = 22,
};
static const char *hint_names[] =
"wm.policy.win.decoration.size.footer",
"wm.policy.win.visibility.ignore_geometry",
"wm.policy.win.resize.ppu",
- "wm.policy.win.decoration.size.shadow",
+ "wm.policy.win.decoration.size.shadow.top",
+ "wm.policy.win.decoration.size.shadow.bottom",
+ "wm.policy.win.decoration.size.shadow.left",
+ "wm.policy.win.decoration.size.shadow.right",
};
static void _e_policy_wl_surf_del(E_Policy_Wl_Surface *psurf);
ELOGF("RESIZE", "Set resize unit. size:%d", ec, ppu);
e_client_resize_unit_size_set(ec, ppu);
}
- else if (!strncmp(hint->hint, hint_names[E_POLICY_HINT_DECORATION_SIZE_SHADOW], strlen(hint->hint)))
+ else if (!strncmp(hint->hint, hint_names[E_POLICY_HINT_DECORATION_SIZE_SHADOW_TOP], strlen(hint->hint)))
{
int size = atoi(hint->val);
if (size > 0)
{
- ELOGF("CSD", "Set decoration SHADOW size.. size(%d)", ec, size);
- ec->manage_resize.shadow = size;
+ ELOGF("CSD", "Set decoration SHADOW top.. size(%d)", ec, size);
+ ec->manage_resize.shadow.t = size;
}
else
{
- ELOGF("CSD", "Unset decoration SHADOW size", ec);
- ec->manage_resize.shadow = 0;
+ ELOGF("CSD", "Unset decoration SHADOW top", ec);
+ ec->manage_resize.shadow.t = 0;
+ }
+ }
+ else if (!strncmp(hint->hint, hint_names[E_POLICY_HINT_DECORATION_SIZE_SHADOW_BOTTOM], strlen(hint->hint)))
+ {
+ int size = atoi(hint->val);
+ if (size > 0)
+ {
+ ELOGF("CSD", "Set decoration SHADOW bottom.. size(%d)", ec, size);
+ ec->manage_resize.shadow.b = size;
+ }
+ else
+ {
+ ELOGF("CSD", "Unset decoration SHADOW bottom", ec);
+ ec->manage_resize.shadow.b = 0;
+ }
+ }
+ else if (!strncmp(hint->hint, hint_names[E_POLICY_HINT_DECORATION_SIZE_SHADOW_LEFT], strlen(hint->hint)))
+ {
+ int size = atoi(hint->val);
+ if (size > 0)
+ {
+ ELOGF("CSD", "Set decoration SHADOW left.. size(%d)", ec, size);
+ ec->manage_resize.shadow.l = size;
+ }
+ else
+ {
+ ELOGF("CSD", "Unset decoration SHADOW left", ec);
+ ec->manage_resize.shadow.l = 0;
+ }
+ }
+ else if (!strncmp(hint->hint, hint_names[E_POLICY_HINT_DECORATION_SIZE_SHADOW_RIGHT], strlen(hint->hint)))
+ {
+ int size = atoi(hint->val);
+ if (size > 0)
+ {
+ ELOGF("CSD", "Set decoration SHADOW right.. size(%d)", ec, size);
+ ec->manage_resize.shadow.r = size;
+ }
+ else
+ {
+ ELOGF("CSD", "Unset decoration SHADOW right", ec);
+ ec->manage_resize.shadow.r = 0;
}
}
}
// TODO: We may need to adjust the last size if the unit size is not devided exactly
- ELOGF("TZPOL", "TIZEN_POLICY_SET_LAYOUT... layout(%d,%d) request(%d,%d,%d,%d) -> unit(%d,%d), geo(%d,%d,%dx%d)",
- ec, num_cols, num_rows, column, row, col_span, row_span, unit_w, unit_h, x, y, w, h);
+ ELOGF("TZPOL", "TIZEN_POLICY_SET_LAYOUT... total_layout(%d,%d) -> unit_size(%dx%d). request(%d,%d,%d,%d) -> geo(%d,%d,%dx%d)",
+ ec, num_cols, num_rows, unit_w, unit_h, column, row, col_span, row_span, x, y, w, h);
- if (ec->manage_resize.shadow)
- {
- x -= ec->manage_resize.shadow;
- y -= ec->manage_resize.shadow;
- w = w + (ec->manage_resize.shadow * 2);
- h = h + (ec->manage_resize.shadow * 2);
- ELOGF("TZPOL", "Shadow is enabled.. Consider Shadow size(%d). new (%d,%d,%dx%d)", ec, ec->manage_resize.shadow, x, y, w, h);
- }
+ // Apply shadow size (left, right, top, bottom)
+ x -= ec->manage_resize.shadow.l;
+ y -= ec->manage_resize.shadow.t;
+ w = w + ec->manage_resize.shadow.l + ec->manage_resize.shadow.r;
+ h = h + ec->manage_resize.shadow.t + ec->manage_resize.shadow.b;
+
+ ELOGF("TZPOL", "Consider Shadow size(l:%d,r:%d,t:%d,b:%d). new (%d,%d,%dx%d)",
+ ec, ec->manage_resize.shadow.l, ec->manage_resize.shadow.r, ec->manage_resize.shadow.t, ec->manage_resize.shadow.b, x, y, w, h);
e_client_frame_geometry_set(ec, x, y, w, h);
}