From: Enlightenment C. <no...@cv...> - 2007-06-25 20:00:53
|
Enlightenment CVS committal Author : kwo Project : e16 Module : e Dir : e16/e/src Modified Files: draw.c Log Message: Avoid move/resize updates when nothing has changed. Disable some code that should be redundant. =================================================================== RCS file: /cvs/e/e16/e/src/draw.c,v retrieving revision 1.107 retrieving revision 1.108 diff -u -3 -r1.107 -r1.108 --- draw.c 24 Jun 2007 20:10:39 -0000 1.107 +++ draw.c 25 Jun 2007 20:00:50 -0000 1.108 @@ -248,10 +248,16 @@ static GC gc = 0; static Pixmap b2 = 0, b3 = 0; Window root = VRoot.xwin; - int x1, y1, w1, h1, i, j, dx, dy; + int x1, y1, w1, h1, dx, dy; int bl, br, bt, bb; char str[32]; + /* Quit if no change */ + if (firstlast == 1 && + (x == ewin->shape_x && y == ewin->shape_y && + (ewin->state.shaded || (w == ewin->shape_w && h == ewin->shape_h)))) + return; + switch (md) { case 0: @@ -278,14 +284,18 @@ if (firstlast == 0) EwinShapeSet(ewin); +#if 0 /* FIXME - Remove? */ if ((Mode.mode == MODE_RESIZE) || (Mode.mode == MODE_RESIZE_H) || (Mode.mode == MODE_RESIZE_V)) { + int i, j; + i = (x - ewin->shape_x) / ewin->icccm.w_inc; j = (y - ewin->shape_y) / ewin->icccm.h_inc; x = ewin->shape_x + (i * ewin->icccm.w_inc); y = ewin->shape_y + (j * ewin->icccm.h_inc); } +#endif dx = EoGetX(EoGetDesk(ewin)); dy = EoGetY(EoGetDesk(ewin)); |