use client window coords for resize-moving without a frame_object

improves placement of csd windows

ref T2750
This commit is contained in:
Mike Blumenkrantz 2015-09-28 15:38:13 -04:00
parent 284d3079b7
commit 14ce1880cb
1 changed files with 8 additions and 4 deletions

View File

@ -838,7 +838,7 @@ static void
_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;
int pw = 0, ph = 0, fw, fh, iw, ih, prev_w, prev_h, x, y;
/* if frame_object does not exist, client_inset indicates CSD.
* this means that ec->client matches cw->w/h, the opposite
@ -980,18 +980,22 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
* which also changes the client's position
*/
cw->force_move = 1;
if (cw->frame_object)
x = cw->x, y = cw->y;
else
x = cw->ec->x, y = cw->ec->y;
switch (cw->ec->resize_mode)
{
case E_POINTER_RESIZE_BL:
case E_POINTER_RESIZE_L:
evas_object_move(obj, cw->x + prev_w - cw->w, cw->y);
evas_object_move(obj, x + prev_w - cw->w, y);
break;
case E_POINTER_RESIZE_TL:
evas_object_move(obj, cw->x + prev_w - cw->w, cw->y + prev_h - cw->h);
evas_object_move(obj, x + prev_w - cw->w, y + prev_h - cw->h);
break;
case E_POINTER_RESIZE_T:
case E_POINTER_RESIZE_TR:
evas_object_move(obj, cw->x, cw->y + prev_h - cw->h);
evas_object_move(obj, x, y + prev_h - cw->h);
break;
default:
break;