Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: ewin-ops.c ewins.c ewins.h menus.c moveresize.c pager.c Log Message: Set window operation source some more places. =================================================================== RCS file: /cvs/e/e16/e/src/ewin-ops.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -3 -r1.93 -r1.94 --- ewin-ops.c 9 Apr 2006 09:26:15 -0000 1.93 +++ ewin-ops.c 12 Apr 2006 15:19:40 -0000 1.94 @@ -156,7 +156,7 @@ if (Conf.place.slidemode) DrawEwinShape(ewin, Conf.place.slidemode, tx, ty, ewin->client.w, ewin->client.h, 2); - EwinMove(ewin, tx, ty); + EwinOpMove(ewin, OPSRC_USER, tx, ty); FocusEnable(1); @@ -572,15 +572,51 @@ } void -EwinFloatAt(EWin * ewin, int x, int y) +EwinOpMove(EWin * ewin, int source, int x, int y) +{ + Mode.op_source = source; + EwinMove(ewin, x, y); + Mode.op_source = 0; +} + +void +EwinOpResize(EWin * ewin, int source, int w, int h) +{ + Mode.op_source = source; + EwinResize(ewin, w, h); + Mode.op_source = 0; +} + +void +EwinOpMoveResize(EWin * ewin, int source, int x, int y, int w, int h) +{ + Mode.op_source = source; + EwinMoveResize(ewin, x, y, w, h); + Mode.op_source = 0; +} + +void +EwinOpMoveToDesktopAt(EWin * ewin, int source, Desk * dsk, int x, int y) +{ + Mode.op_source = source; + EwinMoveToDesktopAt(ewin, dsk, x, y); + Mode.op_source = 0; +} + +void +EwinOpFloatAt(EWin * ewin, int source, int x, int y) { + Mode.op_source = source; doEwinMoveResize(ewin, EoGetDesk(ewin), x, y, 0, 0, MRF_MOVE | MRF_FLOAT); + Mode.op_source = 0; } void -EwinUnfloatAt(EWin * ewin, Desk * dsk, int x, int y) +EwinOpUnfloatAt(EWin * ewin, int source, Desk * dsk, int x, int y) { + Mode.op_source = source; doEwinMoveResize(ewin, dsk, x, y, 0, 0, MRF_MOVE | MRF_UNFLOAT); + Mode.op_source = 0; } void @@ -1287,30 +1323,6 @@ EwinStateUpdate(ewin); HintsSetWindowState(ewin); -} - -void -EwinOpMove(EWin * ewin, int source, int x, int y) -{ - Mode.op_source = source; - EwinMove(ewin, x, y); - Mode.op_source = 0; -} - -void -EwinOpResize(EWin * ewin, int source, int w, int h) -{ - Mode.op_source = source; - EwinResize(ewin, w, h); - Mode.op_source = 0; -} - -void -EwinOpMoveResize(EWin * ewin, int source, int x, int y, int w, int h) -{ - Mode.op_source = source; - EwinMoveResize(ewin, x, y, w, h); - Mode.op_source = 0; } void =================================================================== RCS file: /cvs/e/e16/e/src/ewins.c,v retrieving revision 1.150 retrieving revision 1.151 diff -u -3 -r1.150 -r1.151 --- ewins.c 11 Apr 2006 06:55:14 -0000 1.150 +++ ewins.c 12 Apr 2006 15:19:40 -0000 1.151 @@ -433,29 +433,29 @@ case 0: if (((x + dx < 0) || ((x + dx + w <= VRoot.w) && - ((DesktopAt(xd + x + dx + w - 1, yd) != dsk))))) + (DesktopAt(xd + x + dx + w - 1, yd) != dsk)))) dofloat = 1; break; case 1: if (((x + dx + w > VRoot.w) || - ((x + dx >= 0) && ((DesktopAt(xd + x + dx, yd) != dsk))))) + ((x + dx >= 0) && (DesktopAt(xd + x + dx, yd) != dsk)))) dofloat = 1; break; case 2: if (((y + dy < 0) || ((y + dy + h <= VRoot.h) && - ((DesktopAt(xd, yd + y + dy + h - 1) != dsk))))) + (DesktopAt(xd, yd + y + dy + h - 1) != dsk)))) dofloat = 1; break; case 3: if (((y + dy + h > VRoot.h) || - ((y + dy >= 0) && ((DesktopAt(xd, yd + y + dy) != dsk))))) + ((y + dy >= 0) && (DesktopAt(xd, yd + y + dy) != dsk)))) dofloat = 1; break; } if (dofloat) - EwinFloatAt(ewin, x + xd, y + yd); + EwinOpFloatAt(ewin, OPSRC_USER, x + xd, y + yd); } } @@ -698,6 +698,7 @@ /* We got here by MapRequest. DestroyNotify should follow. */ goto done; } + EwinGetHints(ewin); EwinManage(ewin); EwinConfigure(ewin); =================================================================== RCS file: /cvs/e/e16/e/src/ewins.h,v retrieving revision 1.44 retrieving revision 1.45 diff -u -3 -r1.44 -r1.45 --- ewins.h 6 Apr 2006 21:20:16 -0000 1.44 +++ ewins.h 12 Apr 2006 15:19:40 -0000 1.45 @@ -29,7 +29,7 @@ #include "xwin.h" /* Window operation sources */ -#define OPSRC_UNKNOWN 0 +#define OPSRC_NA 0 #define OPSRC_APP 1 #define OPSRC_USER 2 #define OPSRC_WM 3 @@ -335,8 +335,6 @@ int h, int grav); void EwinMoveToDesktop(EWin * ewin, Desk * d); void EwinMoveToDesktopAt(EWin * ewin, Desk * d, int x, int y); -void EwinFloatAt(EWin * ewin, int x, int y); -void EwinUnfloatAt(EWin * ewin, Desk * d, int x, int y); void EwinIconify(EWin * ewin); void EwinDeIconify(EWin * ewin); void EwinInstantShade(EWin * ewin, int force); @@ -351,6 +349,11 @@ void EwinOpResize(EWin * ewin, int source, int w, int h); void EwinOpMoveResize(EWin * ewin, int source, int x, int y, int w, int h); +void EwinOpMoveToDesktopAt(EWin * ewin, int source, Desk * dsk, + int x, int y); +void EwinOpFloatAt(EWin * ewin, int source, int x, int y); +void EwinOpUnfloatAt(EWin * ewin, int source, Desk * d, + int x, int y); void EwinOpClose(EWin * ewin, int source); void EwinOpActivate(EWin * ewin, int source); void EwinOpKill(EWin * ewin, int source); =================================================================== RCS file: /cvs/e/e16/e/src/menus.c,v retrieving revision 1.233 retrieving revision 1.234 diff -u -3 -r1.233 -r1.234 --- menus.c 2 Apr 2006 09:45:40 -0000 1.233 +++ menus.c 12 Apr 2006 15:19:40 -0000 1.234 @@ -353,7 +353,7 @@ if (!noshow) { ICCCM_Cmap(NULL); - EwinFloatAt(ewin, EoGetX(ewin), EoGetY(ewin)); + EwinOpFloatAt(ewin, OPSRC_NA, EoGetX(ewin), EoGetY(ewin)); ShowEwin(ewin); if (Conf.menus.animate) EwinUnShade(ewin); @@ -1578,7 +1578,7 @@ Mode.move.check = 0; /* Bypass on-screen checks */ EwinMove(ewin2, EoGetX(ewin) + xo, EoGetY(ewin) + yo); Mode.move.check = 1; - EwinFloatAt(ewin2, EoGetX(ewin2), EoGetY(ewin2)); + EwinOpFloatAt(ewin2, OPSRC_NA, EoGetX(ewin2), EoGetY(ewin2)); RaiseEwin(ewin2); ShowEwin(ewin2); =================================================================== RCS file: /cvs/e/e16/e/src/moveresize.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -3 -r1.66 -r1.67 --- moveresize.c 9 Apr 2006 10:18:34 -0000 1.66 +++ moveresize.c 12 Apr 2006 15:19:40 -0000 1.67 @@ -98,7 +98,7 @@ for (i = 0; i < num; i++) { EwinShapeSet(gwins[i]); - EwinFloatAt(gwins[i], EoGetX(gwins[i]), EoGetY(gwins[i])); + EwinOpFloatAt(gwins[i], OPSRC_USER, EoGetX(gwins[i]), EoGetY(gwins[i])); if (Mode_mr.mode == 0) { ewin->state.moving = 1; @@ -152,11 +152,11 @@ ewin = gwins[i]; d1 = EoGetDesk(ewin); if (d2 == d1) - EwinUnfloatAt(ewin, d2, ewin->shape_x, ewin->shape_y); + EwinOpUnfloatAt(ewin, OPSRC_USER, d2, ewin->shape_x, ewin->shape_y); else - EwinUnfloatAt(ewin, d2, - ewin->shape_x - (EoGetX(d2) - EoGetX(d1)), - ewin->shape_y - (EoGetY(d2) - EoGetY(d1))); + EwinOpUnfloatAt(ewin, OPSRC_USER, d2, + ewin->shape_x - (EoGetX(d2) - EoGetX(d1)), + ewin->shape_y - (EoGetY(d2) - EoGetY(d1))); if (Mode_mr.mode == 0) { ewin->state.moving = 0; =================================================================== RCS file: /cvs/e/e16/e/src/pager.c,v retrieving revision 1.200 retrieving revision 1.201 diff -u -3 -r1.200 -r1.201 --- pager.c 9 Apr 2006 10:18:34 -0000 1.200 +++ pager.c 12 Apr 2006 15:19:40 -0000 1.201 @@ -1275,10 +1275,11 @@ continue; if (newdesk) - EwinMoveToDesktopAt(gwins[i], dsk, EoGetX(gwins[i]) + dx, - EoGetY(gwins[i]) + dy); + EwinOpMoveToDesktopAt(gwins[i], OPSRC_USER, dsk, + EoGetX(gwins[i]) + dx, EoGetY(gwins[i]) + dy); else - EwinMove(gwins[i], EoGetX(gwins[i]) + dx, EoGetY(gwins[i]) + dy); + EwinOpMove(gwins[i], OPSRC_USER, EoGetX(gwins[i]) + dx, + EoGetY(gwins[i]) + dy); } if (gwins) Efree(gwins); ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs