Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        desktops.c edge.c 


Log Message:
Fix edge flip after screen size change.

===================================================================
RCS file: /cvs/e/e16/e/src/desktops.c,v
retrieving revision 1.271
retrieving revision 1.272
diff -u -3 -r1.271 -r1.272
--- desktops.c  3 Nov 2007 10:29:54 -0000       1.271
+++ desktops.c  18 Nov 2007 09:47:45 -0000      1.272
@@ -833,6 +833,8 @@
    for (i = 0; i < Conf.desks.num; i++)
       DeskResize(i, w, h);
 
+   EdgeWindowsShow();
+
    ModulesSignal(ESIGNAL_DESK_RESIZE, NULL);
 }
 
@@ -2444,7 +2446,6 @@
        if (tmp_edge_resist < 1)
           tmp_edge_resist = 1;
        Conf.desks.edge_flip_resistance = tmp_edge_resist;
-       EdgeWindowsShow();
      }
    autosave();
 }
===================================================================
RCS file: /cvs/e/e16/e/src/edge.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- edge.c      23 Jul 2007 19:25:08 -0000      1.35
+++ edge.c      18 Nov 2007 09:47:46 -0000      1.36
@@ -29,8 +29,6 @@
 #include "timers.h"
 #include "xwin.h"
 
-/* FIXME: Screen resizing not handled. */
-
 static EObj        *w1 = NULL, *w2 = NULL, *w3 = NULL, *w4 = NULL;
 
 static void
@@ -168,6 +166,49 @@
    EdgeEvent(dir);
 }
 
+static void
+EdgeWindowShow(int which, int on)
+{
+   EObj               *eo;
+   int                 x, y, w, h;
+
+   x = y = 0;
+   w = h = 1;
+
+   switch (which)
+     {
+     default:
+     case 1:                   /* Left */
+       eo = w1;
+       h = VRoot.h;
+       break;
+     case 2:                   /* Right */
+       eo = w2;
+       x = VRoot.w - 1;
+       h = VRoot.h;
+       break;
+     case 3:                   /* Top */
+       eo = w3;
+       w = VRoot.w;
+       break;
+     case 4:                   /* Bottom */
+       eo = w4;
+       y = VRoot.h - 1;
+       w = VRoot.w;
+       break;
+     }
+
+   if (on)
+     {
+       EobjMoveResize(eo, x, y, w, h);
+       EobjMap(eo, 0);
+     }
+   else
+     {
+       EobjUnmap(eo);
+     }
+}
+
 void
 EdgeWindowsShow(void)
 {
@@ -199,22 +240,10 @@
    DeskCurrentGetArea(&cx, &cy);
    DesksGetAreaSize(&ax, &ay);
 
-   if (cx == 0 && !Conf.desks.areas_wraparound)
-      EobjUnmap(w1);
-   else
-      EobjMap(w1, 0);
-   if (cx == (ax - 1) && !Conf.desks.areas_wraparound)
-      EobjUnmap(w2);
-   else
-      EobjMap(w2, 0);
-   if (cy == 0 && !Conf.desks.areas_wraparound)
-      EobjUnmap(w3);
-   else
-      EobjMap(w3, 0);
-   if (cy == (ay - 1) && !Conf.desks.areas_wraparound)
-      EobjUnmap(w4);
-   else
-      EobjMap(w4, 0);
+   EdgeWindowShow(1, cx != 0 || Conf.desks.areas_wraparound);
+   EdgeWindowShow(2, cx != (ax - 1) || Conf.desks.areas_wraparound);
+   EdgeWindowShow(3, cy != 0 || Conf.desks.areas_wraparound);
+   EdgeWindowShow(4, cy != (ay - 1) || Conf.desks.areas_wraparound);
 }
 
 void



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to