Enlightenment CVS committal

Author  : xcomputerman
Project : e_modules
Module  : bling

Dir     : e_modules/bling


Modified Files:
        compmgr.c compmgr.h 


Log Message:
Focus in/out should be a bit more reliable now...even through changing
desktops.

===================================================================
RCS file: /cvs/e/e_modules/bling/compmgr.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- compmgr.c   26 Jun 2006 02:34:09 -0000      1.7
+++ compmgr.c   26 Jun 2006 02:56:54 -0000      1.8
@@ -1118,9 +1118,15 @@
 
    /* Set focus transparency */
    if (ecore_x_window_focus_get() == w->id)
+   {
+      w->focused = True;
       w->opacity = (unsigned int) ((double)config->trans_active_value/100.0 * 
OPAQUE);
+   }
    else
+   {
+      w->focused = False;
       w->opacity = (unsigned int) ((double)config->trans_inactive_value/100.0 
* OPAQUE);
+   }
 
 #if CAN_DO_USABLE
    w->damage_bounds.x = w->damage_bounds.y = 0;
@@ -1196,6 +1202,27 @@
       return;
    w->a.visible = 0;
    w->a.viewable = 0;
+   if (w->focused)
+   {
+      Ecore_X_Window nf = ecore_x_window_focus_get();
+      Win *nf_win;
+
+      w->focused = False;
+      nf_win = composite_win_find(nf);
+      if (nf_win)
+      {
+         nf_win->focused = True;
+         if (composite_fade_is_valid(nf))
+         {
+            double opacity_pct;
+            unsigned int opacity;
+            opacity_pct = ((double) config->trans_active_value)/100.0;
+            opacity = (unsigned int) (OPAQUE * opacity_pct);
+            ecore_x_netwm_opacity_set(nf, opacity);
+         }
+      }
+   }     
+      
 #if HAS_NAME_WINDOW_PIXMAP
    if (w->pixmap && fade && config->fx_fade_enable)
       composite_fade_set(w, w->opacity * 1.0 / OPAQUE, 0.0,
@@ -1747,7 +1774,7 @@
 
    e = ev;
    w = composite_win_find(e->win);
-   if (!w || w->isInFade) return 1;
+   if (!w) return 1;
    if (composite_fade_is_valid(e->win))
    {
       opacity_pct = ((double) config->trans_active_value)/100.0;
@@ -1767,7 +1794,7 @@
 
    e = ev;
    w = composite_win_find(e->win);
-   if (!w || w->isInFade) return 1;
+   if (!w) return 1;
    if (composite_fade_is_valid(e->win))
    {
       opacity_pct = ((double) config->trans_inactive_value)/100.0;
@@ -1883,7 +1910,7 @@
             if (b->config->fx_fade_opacity_enable)
             {
                composite_fade_set(w, w->opacity * 1.0 / OPAQUE, (tmp * 1.0) / 
OPAQUE,
-                        b->config->fx_fade_out_step, 0, False, True, False);
+                        b->config->fx_fade_out_step, 0, False, True, True);
                return 1;
             }
             else
===================================================================
RCS file: /cvs/e/e_modules/bling/compmgr.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- compmgr.h   25 Jun 2006 02:03:07 -0000      1.2
+++ compmgr.h   26 Jun 2006 02:56:54 -0000      1.3
@@ -16,6 +16,7 @@
     Ecore_X_Pixmap             pixmap;
 #endif
     Ecore_X_Window_Attributes  a;
+    Bool       focused;
 #if CAN_DO_USABLE
     Bool               usable;             /* mapped and all damaged at one 
point */
     Ecore_X_Rectangle  damage_bounds;      /* bounds of damage */



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to