Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h borders.c ewmh.c icccm.c iconify.c moveresize.c pager.c 
        session.c snaps.c 


Log Message:
Another attempt to fix some window placement and saved settings issues.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.284
retrieving revision 1.285
diff -u -3 -r1.284 -r1.285
--- E.h 15 Jun 2004 22:11:33 -0000      1.284
+++ E.h 18 Jun 2004 20:12:06 -0000      1.285
@@ -1789,9 +1789,7 @@
 void                EwinEventDestroy(EWin * ewin);
 void                EwinEventMap(EWin * ewin);
 void                EwinEventUnmap(EWin * ewin);
-void                EwinSetArea(EWin * ewin, int ax, int ay);
 void                MoveEwinToArea(EWin * ewin, int ax, int ay);
-void                SetEwinToCurrentArea(EWin * ewin);
 int                 EwinGetDesk(const EWin * ewin);
 const char         *EwinGetTitle(const EWin * ewin);
 const char         *EwinGetIconName(const EWin * ewin);
@@ -2065,6 +2063,7 @@
 #define EDBUG_TYPE_RAISELOWER  132
 #define EDBUG_TYPE_MOVERESIZE  133
 #define EDBUG_TYPE_SESSION     134
+#define EDBUG_TYPE_SNAPS       135
 int                 EventDebug(unsigned int type);
 #else
 #define             EventDebug(type) 0
@@ -2537,8 +2536,6 @@
 char               *GetSMFile(void);
 char               *GetGenericSMFile(void);
 void                MatchEwinToSM(EWin * ewin);
-void                MatchToSnapInfoPager(Pager * p);
-void                MatchToSnapInfoIconbox(Iconbox * ib);
 void                SaveSession(int shutdown);
 void                autosave(void);
 int                 EExit(int exitcode);
@@ -2616,7 +2613,6 @@
 void                MatchEwinToSnapInfo(EWin * ewin);
 void                UnmatchEwinToSnapInfo(EWin * ewin);
 void                RememberImportantInfoForEwin(EWin * ewin);
-void                RememberImportantInfoForEwins(EWin * ewin);
 
 /* sound.c */
 SoundClass         *SclassCreate(const char *name, const char *file);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -3 -r1.193 -r1.194
--- borders.c   8 Jun 2004 19:08:46 -0000       1.193
+++ borders.c   18 Jun 2004 20:12:07 -0000      1.194
@@ -670,6 +670,7 @@
    ICCCM_Configure(ewin);
    EwinBorderDraw(ewin, 1, 1);
 
+   DetermineEwinArea(ewin);
    UngrabX();
 
    EDBUG_RETURN(ewin);
@@ -1121,6 +1122,17 @@
    EDBUG_RETURN_;
 }
 
+static void
+EwinGetSize(EWin * ewin)
+{
+   ewin->x = ewin->client.x - ewin->border->border.left;
+   ewin->y = ewin->client.y - ewin->border->border.top;
+   ewin->w = ewin->client.w +
+      ewin->border->border.left + ewin->border->border.right;
+   ewin->h = ewin->client.h +
+      ewin->border->border.top + ewin->border->border.bottom;
+}
+
 static EWin        *
 Adopt(Window win)
 {
@@ -1151,6 +1163,8 @@
 
    ICCCM_MatchSize(ewin);
    ICCCM_Adopt(ewin);
+
+   EwinGetSize(ewin);
    EwinEventsConfigure(ewin, 0);
 
    UngrabX();
@@ -1189,11 +1203,13 @@
        ewin->skipfocus = 1;
        break;
      case EWIN_TYPE_ICONBOX:
+       ewin->sticky = 1;
        ewin->skiptask = 1;
        ewin->skip_ext_pager = 1;
        ewin->skipfocus = 1;
        break;
      case EWIN_TYPE_PAGER:
+       ewin->sticky = 1;
        ewin->skiptask = 1;
        ewin->skip_ext_pager = 1;
        ewin->skipfocus = 1;
@@ -1205,6 +1221,15 @@
    ICCCM_GetInfo(ewin, 0);
    ICCCM_GetShapeInfo(ewin);
    ICCCM_GetGeoms(ewin, 0);
+   switch (type)
+     {
+     case EWIN_TYPE_DIALOG:
+     case EWIN_TYPE_MENU:
+       ewin->client.width.min = ewin->client.width.max = ewin->client.w;
+       ewin->client.height.min = ewin->client.height.max = ewin->client.h;
+       ewin->client.no_resize_h = ewin->client.no_resize_v = 1;
+       break;
+     }
    MatchEwinToSnapInfo(ewin);
 
    if (!ewin->border)
@@ -1213,6 +1238,8 @@
 
    ICCCM_MatchSize(ewin);
    ICCCM_Adopt(ewin);
+
+   EwinGetSize(ewin);
    EwinEventsConfigure(ewin, 0);
 
    UngrabX();
@@ -1714,7 +1741,7 @@
 }
 
 void
-EwinFixPosition(EWin * ewin __UNUSED__)
+EwinFixPosition(EWin * ewin)
 {
    int                 x, y;
 
@@ -1734,10 +1761,6 @@
 
    if (x != ewin->x || y != ewin->y)
       MoveEwin(ewin, x, y);
-
-#if 0
-   RememberImportantInfoForEwin(ewin);
-#endif
 }
 
 #define MR_FLAGS_MOVE   1
@@ -1804,6 +1827,8 @@
           move = 1;
        ewin->x = x;
        ewin->y = y;
+       ewin->client.x += dx;
+       ewin->client.y += dy;
      }
 
    if (flags & MR_FLAGS_RESIZE)
@@ -2122,8 +2147,6 @@
    if (ewin->win)
       EMapWindow(disp, ewin->win);
 
-   SetEwinToCurrentArea(ewin);
-
    if (Mode.mode == MODE_NONE)
      {
        PagerEwinOutsideAreaUpdate(ewin);
@@ -3147,7 +3170,7 @@
    HintsSetWindowState(ewin);
 }
 
-void
+static void
 EwinSetArea(EWin * ewin, int ax, int ay)
 {
    if (ax == ewin->area_x && ay == ewin->area_y)
@@ -3184,17 +3207,9 @@
    AreaFix(&ax, &ay);
    MoveEwin(ewin, ewin->x + (VRoot.w * (ax - ewin->area_x)),
            ewin->y + (VRoot.h * (ay - ewin->area_y)));
-   EwinSetArea(ewin, ax, ay);
    EDBUG_RETURN_;
 }
 
-void
-SetEwinToCurrentArea(EWin * ewin)
-{
-   EwinSetArea(ewin, desks.desk[ewin->desktop].current_area_x,
-              desks.desk[ewin->desktop].current_area_y);
-}
-
 int
 EwinGetDesk(const EWin * ewin)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- ewmh.c      4 Jun 2004 19:23:44 -0000       1.51
+++ ewmh.c      18 Jun 2004 20:12:09 -0000      1.52
@@ -881,7 +881,6 @@
                ewin->toggle = 0;
 
             func(ewin, "available");
-            RememberImportantInfoForEwin(ewin);
             EWMH_SetWindowState(ewin);
          }
        else if (atom == _NET_WM_STATE_FULLSCREEN)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- icccm.c     16 Jun 2004 22:49:37 -0000      1.68
+++ icccm.c     18 Jun 2004 20:12:09 -0000      1.69
@@ -356,8 +356,8 @@
    ev.xconfigure.display = disp;
    ev.xconfigure.event = ewin->client.win;
    ev.xconfigure.window = ewin->client.win;
-   ev.xconfigure.x = desks.desk[d].x + ewin->x + ewin->border->border.left;
-   ev.xconfigure.y = desks.desk[d].y + ewin->y + ewin->border->border.top;
+   ev.xconfigure.x = desks.desk[d].x + ewin->client.x;
+   ev.xconfigure.y = desks.desk[d].y + ewin->client.y;
    ev.xconfigure.width = ewin->client.w;
    ev.xconfigure.height = ewin->client.h;
    ev.xconfigure.border_width = 0;
@@ -395,12 +395,6 @@
    c[0] = (ewin->client.start_iconified) ? IconicState : NormalState;
    XChangeProperty(disp, win, E_XA_WM_STATE, E_XA_WM_STATE, 32, PropModeReplace,
                   (unsigned char *)c, 2);
-   ewin->x = ewin->client.x;
-   ewin->y = ewin->client.y;
-   ewin->w = ewin->client.w +
-      ewin->border->border.left + ewin->border->border.right;
-   ewin->h = ewin->client.h +
-      ewin->border->border.top + ewin->border->border.bottom;
 
    EDBUG_RETURN_;
 }
@@ -538,6 +532,7 @@
    ewin->client.w = w;
    ewin->client.h = h;
    ewin->client.bw = bw;
+
    if (XGetWMNormalHints(disp, ewin->client.win, &hint, &mask))
      {
        if (!(ewin->client.already_placed))
@@ -589,6 +584,7 @@
             ewin->client.y = 0;
             ewin->client.already_placed = 0;
          }
+
        if (hint.flags & PMinSize)
          {
             ewin->client.width.min = hint.min_width;
@@ -599,6 +595,7 @@
             ewin->client.width.min = 0;
             ewin->client.height.min = 0;
          }
+
        if (hint.flags & PMaxSize)
          {
             ewin->client.width.max = hint.max_width;
@@ -613,6 +610,7 @@
             ewin->client.width.max = 65535;
             ewin->client.height.max = 65535;
          }
+
        if (hint.flags & PResizeInc)
          {
             ewin->client.w_inc = hint.width_inc;
@@ -627,6 +625,7 @@
             ewin->client.w_inc = 1;
             ewin->client.h_inc = 1;
          }
+
        if (hint.flags & PAspect)
          {
             if ((hint.min_aspect.y > 0.0) && (hint.min_aspect.x > 0.0))
@@ -653,6 +652,7 @@
             ewin->client.aspect_min = 0.0;
             ewin->client.aspect_max = 65535.0;
          }
+
        if (hint.flags & PBaseSize)
          {
             ewin->client.base_w = hint.base_width;
@@ -663,21 +663,13 @@
             ewin->client.base_w = ewin->client.width.min;
             ewin->client.base_h = ewin->client.height.min;
          }
+
        if (ewin->client.width.min < ewin->client.base_w)
           ewin->client.width.min = ewin->client.base_w;
        if (ewin->client.height.min < ewin->client.base_h)
           ewin->client.height.min = ewin->client.base_h;
      }
-   if (ewin->client.width.min == 0)
-     {
-       if (ewin->internal)
-         {
-            ewin->client.width.min = w;
-            ewin->client.height.min = h;
-            ewin->client.width.max = w;
-            ewin->client.height.max = h;
-         }
-     }
+
    ewin->client.no_resize_h = 0;
    ewin->client.no_resize_v = 0;
    if (ewin->client.width.min == ewin->client.width.max)
@@ -685,6 +677,11 @@
    if (ewin->client.height.min == ewin->client.height.max)
       ewin->client.no_resize_v = 1;
 
+   if (EventDebug(EDBUG_TYPE_SNAPS))
+      Eprintf("Snap get icccm %#lx: %4d+%4d %4dx%4d: %s\n",
+             ewin->client.win, ewin->client.x, ewin->client.y,
+             ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
+
    EDBUG_RETURN_;
 }
 
@@ -1070,8 +1067,8 @@
       aa = XInternAtom(disp, "ENL_INTERNAL_DATA_BORDER", False);
    c[0] = ewin->desktop;
    c[1] = ewin->sticky;
-   c[2] = ewin->x;
-   c[3] = ewin->y;
+   c[2] = ewin->client.x;
+   c[3] = ewin->client.y;
    c[4] = ewin->iconified;
    if (ewin->iconified)
       ICCCM_DeIconify(ewin);
@@ -1083,6 +1080,10 @@
    XChangeProperty(disp, ewin->client.win, aa, XA_STRING, 8, PropModeReplace,
                   (unsigned char *)ewin->border->name,
                   strlen(ewin->border->name) + 1);
+   if (EventDebug(EDBUG_TYPE_SNAPS))
+      Eprintf("Snap set einf  %#lx: %4d+%4d %4dx%4d: %s\n",
+             ewin->client.win, ewin->client.x, ewin->client.y,
+             ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
    EDBUG_RETURN_;
 }
 
@@ -1117,7 +1118,7 @@
 
    a = XInternAtom(disp, "ENL_INTERNAL_AREA_DATA", False);
    puc = NULL;
-   XGetWindowProperty(disp, VRoot.win, a, 0, 10, False, XA_CARDINAL, &a2,
+   XGetWindowProperty(disp, VRoot.win, a, 0, 0xffff, False, XA_CARDINAL, &a2,
                      &dummy, &lnum, &ldummy, &puc);
    c = (CARD32 *) puc;
    num = (int)lnum;
@@ -1136,7 +1137,7 @@
 
    a = XInternAtom(disp, "ENL_INTERNAL_DESK_DATA", False);
    puc = NULL;
-   XGetWindowProperty(disp, VRoot.win, a, 0, 10, False, XA_CARDINAL, &a2,
+   XGetWindowProperty(disp, VRoot.win, a, 0, 1, False, XA_CARDINAL, &a2,
                      &dummy, &lnum, &ldummy, &puc);
    c = (CARD32 *) puc;
    num = (int)lnum;
@@ -1200,6 +1201,10 @@
        if ((num > 0) && (str))
           EwinSetBorderByName(ewin, str, 0);
        XFree(str);
+       if (EventDebug(EDBUG_TYPE_SNAPS))
+          Eprintf("Snap get einf  %#lx: %4d+%4d %4dx%4d: %s\n",
+                  ewin->client.win, ewin->client.x, ewin->client.y,
+                  ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
      }
    EDBUG_RETURN(0);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -3 -r1.112 -r1.113
--- iconify.c   7 Jun 2004 22:19:25 -0000       1.112
+++ iconify.c   18 Jun 2004 20:12:09 -0000      1.113
@@ -546,6 +546,8 @@
       return;
    call_depth++;
 
+   RememberImportantInfoForEwin(ewin);
+
    if (!Conf.theme.transparency &&
        ib->w == ewin->client.w && ib->h == ewin->client.h)
       goto done;
@@ -602,8 +604,6 @@
    HintsSetWindowName(ib->win, "Iconbox");
    HintsSetWindowClass(ib->win, ib->name, "Enlightenment_IconBox");
 
-   MatchToSnapInfoIconbox(ib);
-
    ewin = AddInternalToFamily(ib->win, "ICONBOX", EWIN_TYPE_ICONBOX, ib,
                              IconboxEwinInit);
    if (ewin)
@@ -615,7 +615,6 @@
 
        IB_Reconfigure(ib);
        sn = FindSnapshot(ewin);
-       ConformEwinToDesktop(ewin);
 
        w = ewin->client.w;
        h = ewin->client.h;
@@ -623,7 +622,7 @@
        ewin->client.h = 1;
        if (sn)
          {
-            ResizeEwin(ewin, w, h);
+            MoveResizeEwin(ewin, ewin->x, ewin->y, w, h);
          }
        else
          {
@@ -2082,7 +2081,6 @@
        EResizeWindow(disp, ib->win, w, h);
        EFreePixmap(disp, ib->pmap);
        ib->pmap = ECreatePixmap(disp, ib->icon_win, w, h, VRoot.depth);
-       RememberImportantInfoForEwins(ib->ewin);
        ib->force_update = 0;
      }
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- moveresize.c        19 May 2004 21:41:03 -0000      1.17
+++ moveresize.c        18 Jun 2004 20:12:09 -0000      1.18
@@ -159,7 +159,6 @@
        FX_Pause();
        UngrabX();
      }
-   RememberImportantInfoForEwins(ewin);
    if (wasresize)
       ForceUpdatePagersForDesktop(desks.current);
    Efree(gwins);
@@ -358,7 +357,6 @@
        UngrabX();
      }
    ForceUpdatePagersForDesktop(desks.current);
-   RememberImportantInfoForEwin(ewin);
 
    EwinUpdateAfterMoveResize(ewin, 1);
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -3 -r1.95 -r1.96
--- pager.c     16 Jun 2004 19:55:41 -0000      1.95
+++ pager.c     18 Jun 2004 20:12:09 -0000      1.96
@@ -235,6 +235,8 @@
    if (!Conf.pagers.enable || !p)
       return;
 
+   RememberImportantInfoForEwin(ewin);
+
    w = ewin->client.w;
    h = ewin->client.h;
    if ((w == p->w) && (h == p->h))
@@ -334,8 +336,6 @@
    pq = Mode.queue_up;
    Mode.queue_up = 0;
 
-   MatchToSnapInfoPager(p);
-
    ewin = AddInternalToFamily(p->win, (p->border_name) ? p->border_name :
                              "PAGER", EWIN_TYPE_PAGER, p, PagerEwinInit);
    if (ewin)
@@ -344,11 +344,9 @@
        Snapshot           *sn;
        double              aspect;
 
-#if 1                          /* Do we need this? */
        ewin->client.event_mask |=
           ButtonPressMask | ButtonReleaseMask | PointerMotionMask;
        XSelectInput(disp, p->win, ewin->client.event_mask);
-#endif
 
        aspect = ((double)VRoot.w) / ((double)VRoot.h);
        GetAreaSize(&ax, &ay);
@@ -384,9 +382,6 @@
 
        /* show the pager ewin */
        ShowEwin(ewin);
-       if (((sn) && (sn->use_sticky) && (sn->sticky)) || (!sn))
-          EwinStick(ewin);
-       RememberImportantInfoForEwin(ewin);
        if (Conf.pagers.snap)
          {
             Esnprintf(s, sizeof(s), "__.%x", (unsigned)p->win);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/session.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- session.c   2 Jun 2004 22:55:18 -0000       1.71
+++ session.c   18 Jun 2004 20:12:10 -0000      1.72
@@ -236,7 +236,7 @@
                  y = desks.desk[ewin->desktop].current_area_y * VRoot.h;
               }
             fprintf(f, "[CLIENT] %i %i %i %i %i %i %i %i %i\n",
-                    ewin->x + x, ewin->y + y, ewin->client.w,
+                    ewin->client.x + x, ewin->client.y + y, ewin->client.w,
                     ewin->client.h, ewin->desktop, ewin->iconified,
                     ewin->shaded, ewin->sticky, ewin->layer);
             if (ewin->session_id)
@@ -418,6 +418,10 @@
                                    ewin->client.y, ewin->client.w,
                                    ewin->client.h);
               }
+            if (EventDebug(EDBUG_TYPE_SNAPS))
+               Eprintf("Snap get sess  %#lx: %4d+%4d %4dx%4d: %s\n",
+                       ewin->client.win, ewin->client.x, ewin->client.y,
+                       ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
             break;
          }
      }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/snaps.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- snaps.c     7 May 2004 15:18:07 -0000       1.68
+++ snaps.c     18 Jun 2004 20:12:10 -0000      1.69
@@ -629,10 +629,17 @@
    if (!sn)
       return;
    sn->use_xy = 1;
-   sn->x = ewin->x;
-   sn->y = ewin->y;
+   sn->x = ewin->client.x;
+   sn->y = ewin->client.y;
    sn->area_x = ewin->area_x;
    sn->area_y = ewin->area_y;
+   if (!ewin->sticky)
+     {
+       sn->x +=
+          ((desks.desk[ewin->desktop].current_area_x - sn->area_x) * VRoot.w);
+       sn->y +=
+          ((desks.desk[ewin->desktop].current_area_y - sn->area_y) * VRoot.h);
+     }
 }
 
 void
@@ -1146,64 +1153,65 @@
    ewin->snap = sn;
    sn->used = 1;
    ListChangeItemID(LIST_TYPE_SNAPSHOT, ewin->snap, 1);
-   if (sn->use_desktop)
-      ewin->desktop = sn->desktop;
+
+   if (sn->use_sticky)
+      ewin->sticky = sn->sticky;
+
+   if (sn->use_desktop && !ewin->sticky)
+      ewin->desktop = DESKTOPS_WRAP_NUM(sn->desktop);
+   else
+      ewin->desktop = desks.current;
+
    if (sn->use_wh)
      {
        ewin->client.w = sn->w;
        ewin->client.h = sn->h;
      }
+
    if (sn->use_xy)
      {
        ewin->client.already_placed = 1;
        ewin->client.x = sn->x;
        ewin->client.y = sn->y;
-       if ((!((sn->use_sticky) && (sn->sticky))) && (!ewin->sticky))
+       ewin->area_x = sn->area_x;
+       ewin->area_y = sn->area_y;
+       if (!ewin->sticky)
          {
-            if (sn->use_desktop)
-              {
-                 ewin->client.x +=
-                    ((sn->area_x - desks.desk[ewin->desktop].current_area_x) *
-                     VRoot.w);
-                 ewin->client.y +=
-                    ((sn->area_y - desks.desk[ewin->desktop].current_area_y) *
-                     VRoot.h);
-              }
-            else
-              {
-                 ewin->client.x +=
-                    ((sn->area_x - desks.desk[desks.current].current_area_x) *
-                     VRoot.w);
-                 ewin->client.y +=
-                    ((sn->area_y - desks.desk[desks.current].current_area_y) *
-                     VRoot.h);
-              }
+            ewin->client.x +=
+               ((sn->area_x - desks.desk[ewin->desktop].current_area_x) *
+                VRoot.w);
+            ewin->client.y +=
+               ((sn->area_y - desks.desk[ewin->desktop].current_area_y) *
+                VRoot.h);
          }
-       ewin->x = ewin->client.x;
-       ewin->y = ewin->client.y;
        EMoveResizeWindow(disp, ewin->client.win, ewin->client.x,
                          ewin->client.y, ewin->client.w, ewin->client.h);
      }
+
    if (sn->use_layer)
       ewin->layer = sn->layer;
-   if (sn->use_sticky)
-      ewin->sticky = sn->sticky;
+
    if (sn->use_skiplists)
      {
        ewin->skipfocus = sn->skipfocus;
        ewin->skiptask = sn->skiptask;
        ewin->skipwinlist = sn->skipwinlist;
      }
+
    if (sn->use_neverfocus)
       ewin->neverfocus = sn->neverfocus;
+
    if (sn->use_shade)
       ewin->shaded = sn->shade;
+
    if (sn->iclass_name)
      {
        /* FIXME: fill this in */
      }
+
    if (sn->border_name)
       EwinSetBorderByName(ewin, sn->border_name, 0);
+
    if (sn->groups)
      {
        for (i = 0; i < sn->num_groups; i++)
@@ -1224,6 +1232,11 @@
                AddEwinToGroup(ewin, g);
          }
      }
+
+   if (EventDebug(EDBUG_TYPE_SNAPS))
+      Eprintf("Snap get snap  %#lx: %4d+%4d %4dx%4d: %s\n",
+             ewin->client.win, ewin->client.x, ewin->client.y,
+             ewin->client.w, ewin->client.h, EwinGetTitle(ewin));
 }
 
 /* make a client window conform to snapshot info */
@@ -1242,66 +1255,14 @@
 }
 
 void
-MatchToSnapInfoPager(Pager * p)
-{
-   XClassHint          hint;
-   char                buf[1024];
-   Snapshot           *sn = NULL;
-   Window              win = PagerGetWin(p);
-
-   if ((!XGetClassHint(disp, win, &hint)))
-      return;
-
-   if ((hint.res_name) && (hint.res_class))
-     {
-       Esnprintf(buf, sizeof(buf), "%s.%s", hint.res_name, hint.res_class);
-       sn = FindItem(buf, 0, LIST_FINDBY_BOTH, LIST_TYPE_SNAPSHOT);
-     }
-   if (hint.res_name)
-      XFree(hint.res_name);
-   if (hint.res_class)
-      XFree(hint.res_class);
-   if (!sn)
-      return;
-   if (sn->use_xy)
-      EMoveWindow(disp, win, sn->x, sn->y);
-   if (sn->use_wh)
-      EResizeWindow(disp, win, sn->w, sn->h);
-}
-
-void
-MatchToSnapInfoIconbox(Iconbox * ib)
-{
-   XClassHint          hint;
-   char                buf[1024];
-   Snapshot           *sn = NULL;
-   Window              win = IconboxGetWin(ib);
-
-   if ((!XGetClassHint(disp, win, &hint)))
-      return;
-
-   if ((hint.res_name) && (hint.res_class))
-     {
-       Esnprintf(buf, sizeof(buf), "%s.%s", hint.res_name, hint.res_class);
-       sn = FindItem(buf, 0, LIST_FINDBY_BOTH, LIST_TYPE_SNAPSHOT);
-     }
-   if (hint.res_name)
-      XFree(hint.res_name);
-   if (hint.res_class)
-      XFree(hint.res_class);
-   if (!sn)
-      return;
-   if (sn->use_xy)
-      EMoveWindow(disp, win, sn->x, sn->y);
-   if (sn->use_wh)
-      EResizeWindow(disp, win, sn->w, sn->h);
-}
-
-void
 RememberImportantInfoForEwin(EWin * ewin)
 {
    if ((ewin->pager) || (ewin->ibox))
      {
+       if (EventDebug(EDBUG_TYPE_SNAPS))
+          Eprintf("RememberImportantInfoForEwin  %#lx %s\n",
+                  ewin->client.win, EwinGetTitle(ewin));
+
        SnapshotEwinBorder(ewin);
        SnapshotEwinDesktop(ewin);
        SnapshotEwinSize(ewin);
@@ -1315,18 +1276,3 @@
        SaveSnapInfo();
      }
 }
-
-void
-RememberImportantInfoForEwins(EWin * ewin)
-{
-   int                 i, num;
-   EWin              **gwins;
-
-   gwins = ListWinGroupMembersForEwin(ewin, ACTION_MOVE, Mode.nogroup, &num);
-   if (gwins)
-     {
-       for (i = 0; i < num; i++)
-          RememberImportantInfoForEwin(gwins[i]);
-       Efree(gwins);
-     }
-}




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to