Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        eobj.c menus.c moveresize.c stacking.c 


Log Message:
Fix floating window stacking. Make menus floating.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/eobj.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- eobj.c      12 Feb 2005 16:16:29 -0000      1.10
+++ eobj.c      20 Feb 2005 23:08:43 -0000      1.11
@@ -54,7 +54,7 @@
        eo->desk = desk;
        break;
      case EOBJ_TYPE_EWIN:
-       if (eo->sticky || eo->desk < 0)
+       if (eo->sticky || eo->floating || eo->desk < 0)
           eo->desk = DesksGetCurrent();
        else
           eo->desk = desk % Conf.desks.num;
@@ -91,12 +91,6 @@
     * TBD: Override redirect
     */
 
-   if (eo->floating)
-     {
-       eo->ilayer = 500;
-       return;
-     }
-
    switch (eo->type)
      {
      case EOBJ_TYPE_EWIN:
@@ -120,6 +114,11 @@
        eo->ilayer = 10 * eo->layer;
        break;
      }
+
+   if (eo->floating)
+      eo->ilayer |= 512;
+   else
+      eo->ilayer &= ~512;
 }
 
 void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -3 -r1.168 -r1.169
--- menus.c     16 Feb 2005 19:48:33 -0000      1.168
+++ menus.c     20 Feb 2005 23:08:43 -0000      1.169
@@ -226,6 +226,8 @@
    ewin->Refresh = MenuEwinRefresh;
    ewin->Close = MenuEwinClose;
    EoSetOpacity(ewin, OpacityExt(Conf.menus.opacity));
+   EoSetSticky(ewin, 1);
+   EoSetFloating(ewin, 1);
 }
 
 static void         MenuShowMasker(Menu * m);
@@ -313,39 +315,10 @@
          }
      }
 
-   if ((Mode.x >= 0) && (Mode.y >= 0))
-     {
-       if (Conf.menus.onscreen)
-          EMoveWindow(m->win, wx, wy);
-       else
-          EMoveWindow(m->win, Mode.x - x - (w / 2), Mode.y - y - (h / 2));
-     }
-   else if ((Mode.x >= 0) && (Mode.y < 0))
-     {
-       if (((-Mode.y) + (int)mh) > (int)VRoot.h)
-          Mode.y = -((-Mode.y) - Mode.context_h - mh);
-       if (Conf.menus.onscreen)
-          EMoveWindow(m->win, wx, -Mode.y);
-       else
-          EMoveWindow(m->win, Mode.x - x - (w / 2), -Mode.y);
-     }
-   else if ((Mode.x < 0) && (Mode.y >= 0))
-     {
-       if (((-Mode.x) + (int)mw) > (int)VRoot.w)
-          Mode.x = -((-Mode.x) - Mode.context_w - mw);
-       if (Conf.menus.onscreen)
-          EMoveWindow(m->win, -Mode.x, wy);
-       else
-          EMoveWindow(m->win, -Mode.x, Mode.y - y - (h / 2));
-     }
+   if (Conf.menus.onscreen)
+      EMoveWindow(m->win, wx, wy);
    else
-     {
-       if (((-Mode.x) + (int)mw) > (int)VRoot.w)
-          Mode.x = -((-Mode.x) - Mode.context_w - mw);
-       if (((-Mode.y) + (int)mh) > (int)VRoot.h)
-          Mode.y = -((-Mode.y) - Mode.context_h - mh);
-       EMoveWindow(m->win, -Mode.x, -Mode.y);
-     }
+      EMoveWindow(m->win, Mode.x - x - (w / 2), Mode.y - y - (h / 2));
 
    ewin = AddInternalToFamily(m->win, m->style->border_name, EWIN_TYPE_MENU, m,
                              MenuEwinInit);
@@ -359,6 +332,7 @@
           EwinInstantShade(ewin, 0);
        ICCCM_Cmap(NULL);
        MoveEwin(ewin, EoGetX(ewin), EoGetY(ewin));
+       FloatEwinAt(ewin, EoGetX(ewin), EoGetY(ewin));
        if (!noshow)
          {
             ShowEwin(ewin);
@@ -988,6 +962,7 @@
        eo = EobjRegister(Mode_menus.cover_win, EOBJ_TYPE_OTHER);
        EobjSetDesk(eo, EoGetDesk(ewin));
        EobjSetLayer(eo, 20);
+       EobjSetFloating(eo, 1);
        EobjListStackLower(eo);
        ESelectInput(Mode_menus.cover_win,
                     ButtonPressMask | ButtonReleaseMask | EnterWindowMask |
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- moveresize.c        25 Jan 2005 21:57:44 -0000      1.29
+++ moveresize.c        20 Feb 2005 23:08:45 -0000      1.30
@@ -70,12 +70,6 @@
    for (i = 0; i < num; i++)
      {
        FloatEwinAt(gwins[i], EoGetX(gwins[i]), EoGetY(gwins[i]));
-#if 0                          /* Will never get here */
-       if (Mode.mode == MODE_MOVE)
-          DrawEwinShape(gwins[i], Conf.movres.mode_move, EoGetX(gwins[i]),
-                        EoGetY(gwins[i]), gwins[i]->client.w,
-                        gwins[i]->client.h, 0);
-#endif
        /* This shouldn't be necessary ... will figure it out some other time */
        gwins[i]->shape_x = EoGetX(gwins[i]);
        gwins[i]->shape_y = EoGetY(gwins[i]);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/stacking.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- stacking.c  8 Jan 2005 08:31:55 -0000       1.15
+++ stacking.c  20 Feb 2005 23:08:45 -0000      1.16
@@ -382,7 +382,7 @@
    for (i = j = 0; i < ewl->nwins; i++)
      {
        eo = ewl->list[i];
-       if (eo->desk != desk)
+       if (eo->desk != desk && !eo->sticky && !eo->floating)
           continue;
 
        lst[j++] = eo;




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to