Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        actions.c sticky.c 


Log Message:
Simplify stick/unstick (fixes raise problem during unstick).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -3 -r1.162 -r1.163
--- actions.c   30 May 2004 15:17:44 -0000      1.162
+++ actions.c   30 May 2004 16:43:28 -0000      1.163
@@ -1572,10 +1572,16 @@
        curr_group = EwinsInGroup(ewin, gwins[i]);
        if (gwins[i]->sticky
            && ((curr_group && !curr_group->cfg.mirror) || sticky))
-          MakeWindowUnSticky(gwins[i]);
+         {
+            SoundPlay("SOUND_WINDOW_UNSTICK");
+            MakeWindowUnSticky(gwins[i]);
+         }
        else if (!gwins[i]->sticky
                 && ((curr_group && !curr_group->cfg.mirror) || !sticky))
-          MakeWindowSticky(gwins[i]);
+         {
+            SoundPlay("SOUND_WINDOW_STICK");
+            MakeWindowSticky(gwins[i]);
+         }
        RememberImportantInfoForEwin(gwins[i]);
      }
    if (gwins)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/sticky.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- sticky.c    4 May 2004 19:04:41 -0000       1.20
+++ sticky.c    30 May 2004 16:43:28 -0000      1.21
@@ -30,19 +30,11 @@
    if (!ewin)
       EDBUG_RETURN_;
 
-   ewin->sticky = 2;           /* Grrr: we are "unsticking" (hack to get the desktop 
right) */
-   ewin->desktop = desks.current;
-   FloatEwinAt(ewin, ewin->x, ewin->y);
-   DrawEwinShape(ewin, 0, ewin->x, ewin->y, ewin->client.w, ewin->client.h, 0);
-   MoveEwinToDesktopAt(ewin, desks.current, ewin->x, ewin->y);
    ewin->sticky = 0;
-   RaiseEwin(ewin);
+   MoveEwinToDesktopAt(ewin, desks.current, ewin->x, ewin->y);
    EwinBorderDraw(ewin, 0, 0);
-
    HintsSetWindowState(ewin);
 
-   SoundPlay("SOUND_WINDOW_UNSTICK");
-
    EDBUG_RETURN_;
 }
 
@@ -55,8 +47,6 @@
    if (!ewin)
       EDBUG_RETURN_;
 
-   ewin->sticky = 1;
-
    /* Avoid "losing" windows made sticky while not in the current viewport */
    dx = ewin->w / 2;
    dy = ewin->h / 2;
@@ -69,21 +59,10 @@
       y += VRoot.h;
    y -= dy;
 
-   if (x != ewin->x || y != ewin->y)
-     {
-       ewin->x = x;
-       ewin->y = y;
-       FloatEwinAt(ewin, ewin->x, ewin->y);
-       DrawEwinShape(ewin, 0, ewin->x, ewin->y, ewin->client.w, ewin->client.h,
-                     0);
-     }
-   MoveEwinToDesktopAt(ewin, desks.current, ewin->x, ewin->y);
-   RaiseEwin(ewin);
+   MoveEwinToDesktopAt(ewin, desks.current, x, y);
+   ewin->sticky = 1;
    EwinBorderDraw(ewin, 0, 0);
-
    HintsSetWindowState(ewin);
 
-   SoundPlay("SOUND_WINDOW_STICK");
-
    EDBUG_RETURN_;
 }




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to