Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h coords.c draw.c moveresize.c 


Log Message:
Fix minor glitch with coordinate window being mapped too early + cosmetics.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.294
retrieving revision 1.295
diff -u -3 -r1.294 -r1.295
--- E.h 28 Jun 2004 23:37:45 -0000      1.294
+++ E.h 29 Jun 2004 08:52:40 -0000      1.295
@@ -1887,8 +1887,8 @@
 void                SaveUserControlConfig(FILE * autosavefile);
 
 /* coords.c */
-void                SetCoords(EWin * ewin);
-void                HideCoords(void);
+void                CoordsShow(EWin * ewin);
+void                CoordsHide(void);
 
 /* cursors.c */
 ECursor            *CreateECursor(char *name, char *image, int native_id,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/coords.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- coords.c    3 Jun 2004 18:04:44 -0000       1.20
+++ coords.c    29 Jun 2004 08:52:41 -0000      1.21
@@ -27,7 +27,7 @@
 static int          cx = 0, cy = 0, cw = 0, ch = 0;
 
 void
-SetCoords(EWin * ewin)
+CoordsShow(EWin * ewin)
 {
    TextClass          *tc;
    ImageClass         *ic;
@@ -42,8 +42,6 @@
 
    tc = FindItem("COORDS", 0, LIST_FINDBY_NAME, LIST_TYPE_TCLASS);
    ic = FindItem("COORDS", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS);
-   if (!c_win)
-      c_win = ECreateWindow(VRoot.win, 0, 0, 1, 1, 2);
    if ((!ic) || (!tc))
       return;
 
@@ -56,22 +54,18 @@
    TextSize(tc, 0, 0, 0, s, &cw, &ch, 17);
    cw += (ic->padding.left + ic->padding.right);
    ch += (ic->padding.top + ic->padding.bottom);
+
+   cx = 0;
+   cy = 0;
    if (ewin)
      {
-       md = 0;
        if (Mode.mode == MODE_MOVE)
           md = Conf.movemode;
        else
           md = Conf.resizemode;
-       if ((md > 0) && ((cw >= (ewin->w)) || (ch >= (ewin->h))))
-         {
-            cx = 0;
-            cy = 0;
-         }
-       else
+
+       if ((md == 0) || ((cw < ewin->client.w) && (ch < ewin->client.h)))
          {
-            cx = 0;
-            cy = 0;
             if (Conf.geominfomode == 1)
               {
                  switch (md)
@@ -88,26 +82,27 @@
               }
          }
      }
-   else
-     {
-       cx = 0;
-       cy = 0;
-     }
+
+   if (!c_win)
+      c_win = ECreateWindow(VRoot.win, 0, 0, 1, 1, 2);
+
+   EMoveResizeWindow(disp, c_win, cx, cy, cw, ch);
+   XRaiseWindow(disp, c_win);
+
    if (!coords_visible)
       EMapWindow(disp, c_win);
-   XRaiseWindow(disp, c_win);
-   EMoveResizeWindow(disp, c_win, cx, cy, cw, ch);
+   coords_visible = 1;
+
    pq = Mode.queue_up;
    Mode.queue_up = 0;
    IclassApply(ic, c_win, cw, ch, 1, 0, STATE_NORMAL, 0, ST_UNKNWN);
    TclassApply(ic, c_win, cw, ch, 0, 0, STATE_NORMAL, 0, tc, s);
    Mode.queue_up = pq;
    XFlush(disp);
-   coords_visible = 1;
 }
 
 void
-HideCoords(void)
+CoordsHide(void)
 {
    if (c_win)
       EUnmapWindow(disp, c_win);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- draw.c      3 Jun 2004 18:04:44 -0000       1.49
+++ draw.c      29 Jun 2004 08:52:41 -0000      1.50
@@ -1361,7 +1361,7 @@
        ewin->shape_x = x;
        ewin->shape_y = y;
        if (Mode.mode != MODE_NONE)
-          SetCoords(ewin);
+          CoordsShow(ewin);
        break;
      case 1:
      case 2:
@@ -1531,7 +1531,7 @@
               }
             if ((Mode.mode != MODE_NONE)
                 && (!ewin->groups || (ewin->groups && !check_move)))
-               SetCoords(ewin);
+               CoordsShow(ewin);
             if (firstlast < 2)
               {
                  DO_DRAW_MODE_1(x, y, w, h);
@@ -1545,7 +1545,7 @@
               }
             if ((Mode.mode != MODE_NONE)
                 && (!ewin->groups || (ewin->groups && !check_move)))
-               SetCoords(ewin);
+               CoordsShow(ewin);
             if (firstlast < 2)
               {
                  DO_DRAW_MODE_2(x, y, w, h);
@@ -1559,7 +1559,7 @@
               }
             if ((Mode.mode != MODE_NONE)
                 && (!ewin->groups || (ewin->groups && !check_move)))
-               SetCoords(ewin);
+               CoordsShow(ewin);
             if (firstlast < 2)
               {
                  DO_DRAW_MODE_3(x, y, w, h);
@@ -1573,7 +1573,7 @@
               }
             if ((Mode.mode != MODE_NONE)
                 && (!ewin->groups || (ewin->groups && !check_move)))
-               SetCoords(ewin);
+               CoordsShow(ewin);
             if (firstlast < 2)
               {
                  DO_DRAW_MODE_4(x, y, w, h);
@@ -1720,7 +1720,7 @@
                  root_pi->pmap = 0;
               }
             if (Mode.mode != MODE_NONE)
-               SetCoords(ewin);
+               CoordsShow(ewin);
          }
        if (firstlast == 2)
          {
@@ -1746,6 +1746,8 @@
      {
        ewin->req_x = ewin->shape_x;
        ewin->req_y = ewin->shape_y;
+       if (firstlast == 2)
+          CoordsHide();
      }
 
  done:
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- moveresize.c        26 Jun 2004 18:24:39 -0000      1.19
+++ moveresize.c        29 Jun 2004 08:52:41 -0000      1.20
@@ -155,7 +155,6 @@
      }
    StackDesktop(ewin->desktop);        /* Restack to "un-float" */
 
-   HideCoords();
    XSync(disp, False);
    if (Conf.movemode > 0)
      {
@@ -352,7 +351,6 @@
    for (i = 0; i < ewin->border->num_winparts; i++)
       ewin->bits[i].no_expose = 1;
    ICCCM_Configure(ewin);
-   HideCoords();
    XSync(disp, False);
    if (Conf.resizemode > 0)
      {




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to