Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        ewins.h focus.c stacking.c 


Log Message:
Click-raises tweak (don't set grabs if window cannot be raised).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewins.h     18 Oct 2005 19:21:25 -0000      1.18
+++ ewins.h     20 Oct 2005 18:18:13 -0000      1.19
@@ -330,8 +330,9 @@
 EWin               *const *EwinListStackGet(int *num);
 EWin               *const *EwinListFocusGet(int *num);
 EWin               *const *EwinListGetForDesk(int *num, struct _desk *d);
-EWin               *EwinListStackGetTop(void);
 EWin               *const *EwinListOrderGet(int *num);
+EWin               *EwinListStackGetTop(void);
+int                 EwinListStackIsRaised(const EWin * ewin);
 
 #define EwinListGetAll EwinListStackGet
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -3 -r1.125 -r1.126
--- focus.c     20 Oct 2005 18:09:35 -0000      1.125
+++ focus.c     20 Oct 2005 18:18:13 -0000      1.126
@@ -208,7 +208,7 @@
        set = !ewin->state.active;
      }
    if (ewin->state.active && Conf.focus.clickraises &&
-       ewin != EwinListStackGetTop())
+       !EwinListStackIsRaised(ewin))
       set = 1;
 
    if (set)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/stacking.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- stacking.c  21 Sep 2005 21:13:45 -0000      1.28
+++ stacking.c  20 Oct 2005 18:18:13 -0000      1.29
@@ -435,6 +435,7 @@
    return lst;
 }
 
+#if 0                          /* Unused */
 EWin               *
 EwinListStackGetTop(void)
 {
@@ -453,6 +454,32 @@
 
    return NULL;
 }
+#endif
+
+int
+EwinListStackIsRaised(const EWin * ewin)
+{
+   const EobjList     *ewl;
+   int                 i;
+   const EObj         *eo, *eox;
+
+   ewl = &EwinListStack;
+   eox = EoObj(ewin);
+
+   for (i = 0; i < ewl->nwins; i++)
+     {
+       eo = ewl->list[i];
+       if (eo->type != EOBJ_TYPE_EWIN)
+          continue;
+       if (eo->desk != eox->desk)
+          continue;
+       if (eo->ilayer > eox->ilayer)
+          continue;
+       return eo == eox;
+     }
+
+   return 1;                   /* It should be impossible to get here */
+}
 
 void
 EobjListOrderAdd(EObj * eo)




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to