more overhead. screw u composite! screw you!. i now know what is needed...
authorCarsten Haitzler <raster@rasterman.com>
Thu, 11 Feb 2010 11:09:18 +0000 (11:09 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Thu, 11 Feb 2010 11:09:18 +0000 (11:09 +0000)
and  whats there now is not pretty.

SVN revision: 46074

src/modules/comp/e_mod_comp.c

index 8efa317e1053b2a31e1ed78ffe75e79e365316cc..299310b0085a203d7bef1b627ce13f88f7c1d1f8 100644 (file)
@@ -925,9 +925,9 @@ _e_mod_comp_win_show(E_Comp_Win *cw)
    cw->visible = 1;
    DBG("  [0x%x] sho ++++++++++\n", cw->win);
    if ((cw->input_only) || (cw->invalid)) return;
-   /*
-   if (cw->redirected)
+//   if (cw->redirected)
      {
+/*        
         if (cw->native) evas_object_image_native_surface_set(cw->obj, NULL);
         if (cw->pixmap) ecore_x_pixmap_free(cw->pixmap);
         evas_object_image_size_set(cw->obj, 1, 1);
@@ -937,8 +937,41 @@ _e_mod_comp_win_show(E_Comp_Win *cw)
         cw->native = 0;
         ecore_x_composite_unredirect_window(cw->win, ECORE_X_COMPOSITE_UPDATE_MANUAL);
         cw->redirected = 0;
+ */
+        if (cw->pixmap) ecore_x_pixmap_free(cw->pixmap);
+        evas_object_image_size_set(cw->obj, cw->pw, cw->ph);
+//        ecore_x_window_resize(cw->win, cw->w + 10, cw->h + 10);
+        cw->pixmap = ecore_x_composite_name_window_pixmap_get(cw->win);
+        if (cw->pixmap)
+          ecore_x_pixmap_geometry_get(cw->pixmap, NULL, NULL, &(cw->pw), &(cw->ph));
+        else
+          {
+             cw->pw = 0;
+             cw->ph = 0;
+          }
+        if ((cw->pw <= 0) || (cw->ph <= 0))
+          {
+             ecore_x_pixmap_free(cw->pixmap);
+             cw->pixmap = 0;
+          }
+        if ((cw->c->gl) && (_comp_mod->conf->texture_from_pixmap) &&
+            (!cw->shaped) && (!cw->shape_changed) && (cw->pixmap))
+          {
+             Evas_Native_Surface ns;
+             
+             ns.data.x11.visual = cw->vis;
+             ns.data.x11.pixmap = cw->pixmap;
+             evas_object_image_native_surface_set(cw->obj, &ns);
+             DBG("NATIVE SHOW1 [0x%x] %x %ix%i\n", cw->win, cw->pixmap, cw->pw, cw->ph);
+             cw->native = 1;
+          }
+//        ecore_x_window_resize(cw->win, cw->w, cw->h);
+        if (cw->pixmap) ecore_x_pixmap_free(cw->pixmap);
+        cw->pixmap = 0; 
+        cw->pw = 0;
+        cw->ph = 0;
+        cw->native = 0;
      }
-   */
    if (!cw->redirected)
      {
         ecore_x_composite_redirect_window(cw->win, ECORE_X_COMPOSITE_UPDATE_MANUAL);
@@ -1062,6 +1095,17 @@ _e_mod_comp_win_hide(E_Comp_Win *cw)
                   ecore_x_pixmap_free(cw->pixmap);
                   cw->pixmap = 0;
                }
+             if ((cw->c->gl) && (_comp_mod->conf->texture_from_pixmap) &&
+                 (!cw->shaped) && (!cw->shape_changed) && (cw->pixmap))
+               {
+                  Evas_Native_Surface ns;
+                  
+                  ns.data.x11.visual = cw->vis;
+                  ns.data.x11.pixmap = cw->pixmap;
+                  evas_object_image_native_surface_set(cw->obj, &ns);
+                  DBG("NATIVE SHOW1 [0x%x] %x %ix%i\n", cw->win, cw->pixmap, cw->pw, cw->ph);
+                  cw->native = 1;
+               }
              cw->dmg_updates = 0;
           }
         return;