bxx = pw - (bx + bxx), byy = ph - (by + byy);
evas_object_image_border_set(cw->obj, bx, bxx, by, byy);
}
- else if (cw->client_inset.calc) //CSD
- {
- bx = -cw->client_inset.l + 4, by = -cw->client_inset.t + 4;
- bxx = -cw->client_inset.r, byy = -cw->client_inset.b;
- }
else
{
bx = by = bxx = byy = 0;
_e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y)
{
E_Comp_Object *cw = data;
- int ix, iy, fx, fy;
if (cw->render_update_lock.lock)
{
(cw->ec->manage_resize.resize_obj))
{
e_client_pos_set(cw->ec, x, y);
- cw->ec->client.x = x + cw->client_inset.l;
- cw->ec->client.y = y + cw->client_inset.t;
+ cw->ec->client.x = x;
+ cw->ec->client.y = y;
e_policy_visibility_client_defer_move(cw->ec);
return;
}
* this means that ec->client matches cw->x/y, the opposite
* of SSD.
*/
- fx = cw->client_inset.l;
- fy = cw->client_inset.t;
- if ((cw->x == x + fx) && (cw->y == y + fy))
+ if ((cw->x == x) && (cw->y == y))
{
if ((cw->ec->x != x) || (cw->ec->y != y))
{
/* handle case where client tries to move to position and back very quickly */
e_client_pos_set(cw->ec, x, y);
- cw->ec->client.x = x + cw->client_inset.l;
- cw->ec->client.y = y + cw->client_inset.t;
+ cw->ec->client.x = x;
+ cw->ec->client.y = y;
}
return;
}
if ((cw->ec->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_HORIZONTAL)
x = cw->x;
}
- ix = x + cw->client_inset.l;
- iy = y + cw->client_inset.t;
if (cw->ec->maximized && (!cw->ec->maximize_override) && ((cw->ec->x != x) || (cw->ec->y != y)) &&
((cw->ec->maximized & E_MAXIMIZE_DIRECTION) != E_MAXIMIZE_VERTICAL) &&
((cw->ec->maximized & E_MAXIMIZE_DIRECTION) != E_MAXIMIZE_HORIZONTAL))
if (!zone) return;
cw->ec->changes.need_unmaximize = 1;
- cw->ec->saved.x = ix - zone->x;
- cw->ec->saved.y = iy - zone->y;
+ cw->ec->saved.x = 0 - zone->x;
+ cw->ec->saved.y = 0 - zone->y;
cw->ec->saved.w = cw->ec->client.w;
cw->ec->saved.h = cw->ec->client.h;
EC_CHANGED(cw->ec);
{
/* only update xy position of client to avoid invalid
* first damage region if it is not a new_client. */
- cw->ec->client.x = ix;
- cw->ec->client.y = iy;
+ cw->ec->client.x = 0;
+ cw->ec->client.y = 0;
- x = ix, y = iy;
+ x = 0, y = 0;
evas_object_move(obj, x, y);
}
}
_e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
{
E_Comp_Object *cw = data;
- int pw = 0, ph = 0, fw, fh, iw, ih, prev_w, prev_h, x, y;
+ int pw = 0, ph = 0, prev_w, prev_h, x, y;
E_Zone *zone;
if (cw->render_update_lock.lock)
* this means that ec->client matches cw->w/h, the opposite
* of SSD.
*/
- fw = -cw->client_inset.l - cw->client_inset.r;
- fh = -cw->client_inset.t - cw->client_inset.b;
- if ((cw->w == w + fw) && (cw->h == h + fh))
+ if ((cw->w == w) && (cw->h == h))
{
if (((cw->ec->w != w) || (cw->ec->h != h)) ||
- (cw->ec->client.w != w - cw->client_inset.l - cw->client_inset.r) ||
- (cw->ec->client.h != h - cw->client_inset.t - cw->client_inset.b))
+ (cw->ec->client.w != w) ||
+ (cw->ec->client.h != h))
{
/* handle case where client tries to resize itself and back very quickly */
e_client_size_set(cw->ec, w, h);
- cw->ec->client.w = w - cw->client_inset.l - cw->client_inset.r;
- cw->ec->client.h = h - cw->client_inset.t - cw->client_inset.b;
+ cw->ec->client.w = w;
+ cw->ec->client.h = h;
wl_signal_emit(&cw->events.resize, NULL);
}
return;
}
+
/* guarantee that fullscreen is fullscreen */
zone = e_comp_zone_find_by_ec(cw->ec);
if (!zone) return;
return;
}
/* calculate client size */
- iw = w - cw->client_inset.l - cw->client_inset.r;
- ih = h - cw->client_inset.t - cw->client_inset.b;
if (cw->ec->maximized && (!cw->ec->maximize_override) && ((cw->ec->w != w) || (cw->ec->h != h)))
{
/* prevent resizing while maximized depending on direction and config */
Eina_Bool reject = EINA_FALSE;
if (cw->ec->maximized & E_MAXIMIZE_VERTICAL)
{
- if (cw->ec->client.h != ih)
+ if (cw->ec->client.h != 0)
{
- cw->ec->saved.h = ih;
+ cw->ec->saved.h = 0;
cw->ec->saved.y = cw->ec->client.y - zone->y;
reject = cw->ec->changes.need_unmaximize = 1;
}
}
if (cw->ec->maximized & E_MAXIMIZE_HORIZONTAL)
{
- if (cw->ec->client.w != iw)
+ if (cw->ec->client.w != 0)
{
- cw->ec->saved.w = iw;
+ cw->ec->saved.w = 0;
cw->ec->saved.x = cw->ec->client.x - zone->x;
reject = cw->ec->changes.need_unmaximize = 1;
}
e_client_size_set(cw->ec, w, h);
- cw->ec->client.w = iw;
- cw->ec->client.h = ih;
+ cw->ec->client.w = 0;
+ cw->ec->client.h = 0;
if ((cw->ec->client.w < 0) || (cw->ec->client.h < 0)) CRI("WTF. ec:%p", cw->ec);
/* The size of non-compositing window can be changed, so there is a
cw->content_type == E_COMP_OBJECT_CONTENT_TYPE_EXT_EDJE)
pw = w, ph = h;
prev_w = cw->w, prev_h = cw->h;
- e_comp_object_frame_wh_adjust(obj, 0, 0, &fw, &fh);
+
/* check shading and clamp to pixmap size for regular clients */
if ((!cw->ec->input_only) && (!cw->ec->override) &&
- (((w - fw != pw) || (h - fh != ph))))
+ (((w != pw) || (h != ph))))
{
//INF("CALLBACK: REQ(%dx%d) != CUR(%dx%d)", w - fw, h - fh, pw, ph);
wl_signal_emit(&cw->events.resize, NULL);
{
API_ENTRY;
- cw->client_inset.l = 0;
- cw->client_inset.r = 0;
- cw->client_inset.t = 0;
- cw->client_inset.b = 0;
-
- cw->client_inset.calc = 0;
+ //TODO: remove this function
}
static void
e_comp_object_frame_xy_adjust(Evas_Object *obj, int x, int y, int *ax, int *ay)
{
API_ENTRY;
- if (!cw->client_inset.calc)
- {
- if (ax) *ax = x;
- if (ay) *ay = y;
- return;
- }
- if (ax) *ax = x - cw->client_inset.l;
- if (ay) *ay = y - cw->client_inset.t;
+
+ // TODO: this function will be removed
+ if (ax) *ax = x;
+ if (ay) *ay = y;
}
E_API void
e_comp_object_frame_xy_unadjust(Evas_Object *obj, int x, int y, int *ax, int *ay)
{
API_ENTRY;
- if (!cw->client_inset.calc)
- {
- if (ax) *ax = x;
- if (ay) *ay = y;
- return;
- }
- if (ax) *ax = x + cw->client_inset.l;
- if (ay) *ay = y + cw->client_inset.t;
+
+ // TODO: this function will be removed
+ if (ax) *ax = x;
+ if (ay) *ay = y;
}
E_API void
e_comp_object_frame_wh_adjust(Evas_Object *obj, int w, int h, int *aw, int *ah)
{
API_ENTRY;
- if (!cw->client_inset.calc)
- {
- if (aw) *aw = w;
- if (ah) *ah = h;
- return;
- }
- if (aw) *aw = w + cw->client_inset.l + cw->client_inset.r;
- if (ah) *ah = h + cw->client_inset.t + cw->client_inset.b;
+
+ // TODO: this function will be removed
+ if (aw) *aw = w;
+ if (ah) *ah = h;
}
E_API void
e_comp_object_frame_wh_unadjust(Evas_Object *obj, int w, int h, int *aw, int *ah)
{
API_ENTRY;
- if (!cw->client_inset.calc)
- {
- if (aw) *aw = w;
- if (ah) *ah = h;
- return;
- }
- if (aw) *aw = w - cw->client_inset.l - cw->client_inset.r;
- if (ah) *ah = h - cw->client_inset.t - cw->client_inset.b;
+
+ // TODO: this function will be removed
+ if (aw) *aw = w;
+ if (ah) *ah = h;
}
E_API E_Client *
e_comp_object_frame_allowed(Evas_Object *obj)
{
API_ENTRY EINA_FALSE;
- return (!cw->client_inset.calc);
+
+ // TODO: this function will be removed
+
+ return EINA_TRUE;
}
EINTERN Eina_Bool