discomfitor pushed a commit to branch master.

commit 2ae8713130b6cf4f0e1b63bb722c50ad3c501168
Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Apr 23 15:37:35 2013 +0100

    fix comp pixmap fetching to refetch when X is slow
---
 src/bin/e_comp.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 27468e2..07d7d3c 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -587,25 +587,22 @@ _e_comp_win_update(E_Comp_Win *cw)
         /*           pm = e_comp_wl_pixmap_get(cw->win); */
         /* #endif */
         if (!pm) pm = ecore_x_composite_name_window_pixmap_get(cw->win);
-        if (pm)
+        while (pm)
           {
              Ecore_X_Pixmap oldpm;
 
-             cw->needpix = 0;
-             if (cw->xim) cw->needxim = 1;
              oldpm = cw->pixmap;
-             cw->pixmap = pm;
-             if (cw->pixmap)
+             ecore_x_pixmap_geometry_get(pm, NULL, NULL, &(cw->pw), &(cw->ph));
+             if ((pw == cw->pw) && (ph == cw->ph))
                {
-                  ecore_x_pixmap_geometry_get(cw->pixmap, NULL, NULL, 
&(cw->pw), &(cw->ph));
-                  _e_comp_win_ready_timeout_setup(cw);
-                  if ((cw->pw != pw) || (cw->ph != ph)) cw->geom_update = 1;
-               }
-             else
-               {
-                  cw->pw = 0;
-                  cw->ph = 0;
+                  ecore_x_pixmap_free(pm);
+                  break;
                }
+             cw->pixmap = pm;
+             cw->needpix = 0;
+             if (cw->xim) cw->needxim = 1;
+             _e_comp_win_ready_timeout_setup(cw);
+             if ((cw->pw != pw) || (cw->ph != ph)) cw->geom_update = 1;
              DBG("REND [0x%x] pixmap = [0x%x], %ix%i", cw->win, cw->pixmap, 
cw->pw, cw->ph);
              if ((cw->pw <= 0) || (cw->ph <= 0))
                {
@@ -654,6 +651,7 @@ _e_comp_win_update(E_Comp_Win *cw)
                    */
                   ecore_x_pixmap_free(oldpm);
                }
+             break;
           }
      }
    if (!((cw->pw > 0) && (cw->ph > 0)))

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr

Reply via email to