Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h borders.c slideout.c 


Log Message:
A slideout fix after mode.ewin removal.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -3 -r1.183 -r1.184
--- E.h 18 Jan 2004 10:24:03 -0000      1.183
+++ E.h 18 Jan 2004 13:43:52 -0000      1.184
@@ -1308,7 +1308,6 @@
    Menu               *cur_menu[256];
    Window              menu_cover_win;
    Window              menu_win_covered;
-   char                borderpartpress;
    char                windowdestroy;
    int                 context_w, context_h;
    Pager              *context_pager;
@@ -1760,6 +1759,9 @@
                                  void *ptr);
 EWin               *CreateEwin(void);
 void                FreeEwin(EWin * ewin);
+int                 EwinGetDesk(EWin * ewin);
+int                 EwinWinpartIndex(EWin * ewin, Window win);
+
 int                 BordersEventMouseDown(XEvent * ev);
 int                 BordersEventMouseUp(XEvent * ev);
 int                 BordersEventMouseIn(XEvent * ev);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -3 -r1.122 -r1.123
--- borders.c   18 Jan 2004 10:24:04 -0000      1.122
+++ borders.c   18 Jan 2004 13:43:53 -0000      1.123
@@ -3099,6 +3099,26 @@
    EDBUG_RETURN_;
 }
 
+int
+EwinGetDesk(EWin * ewin)
+{
+   return (ewin->sticky) ? desks.current : ewin->desktop;
+}
+
+int
+EwinWinpartIndex(EWin * ewin, Window win)
+{
+   int                 i;
+
+   for (i = 0; i < ewin->border->num_winparts; i++)
+     {
+       if (win == ewin->bits[i].win)
+          return i;
+     }
+
+   return -1;                  /* Not found */
+}
+
 /*
  * Border event handlers
  */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/slideout.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- slideout.c  18 Jan 2004 10:24:06 -0000      1.16
+++ slideout.c  18 Jan 2004 13:43:53 -0000      1.17
@@ -180,11 +180,14 @@
    /* If the slideout is associated with an ewin,
     * put it on the same virtual desktop. */
    dw = root.win;
-   if (ewin /* && !ewin->sticky */  && !ewin->floating)
+   if (ewin && EwinWinpartIndex(ewin, win) >= 0 &&
+       !ewin->floating /* && !ewin->sticky */ )
      {
-       xx -= desks.desk[ewin->desktop].x;
-       yy -= desks.desk[ewin->desktop].y;
-       dw = desks.desk[ewin->desktop].win;
+       int                 desk = EwinGetDesk(ewin);
+
+       xx -= desks.desk[desk].x;
+       yy -= desks.desk[desk].y;
+       dw = desks.desk[desk].win;
      }
    EReparentWindow(disp, s->win, dw, xx, yy);
 




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to