devilhorns pushed a commit to branch master.

commit 9372a1e21714e470076a3186beb458fab26bbc0b
Author: Chris Michael <[email protected]>
Date:   Wed May 1 07:32:10 2013 +0100

    Revert "Reduce duplicated code and comment out region_add sections that are"
    
    This reverts commit 279c5ac28e93ef6f02dc890435eb5342efe19571.
    
    This broke rotation (and some other things).
---
 src/lib/ecore_wayland/ecore_wl_window.c | 55 +++++++++++++++++----------------
 1 file changed, 28 insertions(+), 27 deletions(-)

diff --git a/src/lib/ecore_wayland/ecore_wl_window.c 
b/src/lib/ecore_wayland/ecore_wl_window.c
index 163761b..dea2f69 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -150,24 +150,24 @@ ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int 
h, int location)
 
    if (!win) return;
 
-   /* if (win->type != ECORE_WL_WINDOW_TYPE_FULLSCREEN) */
-   /*   { */
-   /*      win->allocation.w = w; */
-   /*      win->allocation.h = h; */
+   if (win->type != ECORE_WL_WINDOW_TYPE_FULLSCREEN)
+     {
+        win->allocation.w = w;
+        win->allocation.h = h;
 
-        /* win->region.input =  */
-        /*   wl_compositor_create_region(_ecore_wl_disp->wl.compositor); */
-        /* wl_region_add(win->region.input, win->allocation.x, 
win->allocation.y,  */
-        /*               win->allocation.w, win->allocation.h); */
-     /* } */
+        win->region.input = 
+          wl_compositor_create_region(_ecore_wl_disp->wl.compositor);
+        wl_region_add(win->region.input, win->allocation.x, win->allocation.y, 
+                      win->allocation.w, win->allocation.h);
+     }
 
-   /* if (!win->transparent) */
-   /*   { */
-   /*      win->region.opaque =  */
-   /*        wl_compositor_create_region(_ecore_wl_disp->wl.compositor); */
-   /*      wl_region_add(win->region.opaque, win->allocation.x, 
win->allocation.y,  */
-   /*                    win->allocation.w, win->allocation.h); */
-   /*   } */
+   if (!win->transparent)
+     {
+        win->region.opaque = 
+          wl_compositor_create_region(_ecore_wl_disp->wl.compositor);
+        wl_region_add(win->region.opaque, win->allocation.x, 
win->allocation.y, 
+                      win->allocation.w, win->allocation.h);
+     }
 
    if (win->shell_surface)
      {
@@ -230,9 +230,11 @@ ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct 
wl_buffer *buffer, in
 
              win->edges = 0;
 
+             /* if (buffer) */
              wl_surface_attach(win->surface, buffer, x, y);
-             ecore_wl_window_damage(win, 0, 0, 
-                                    win->allocation.w, win->allocation.h);
+             wl_surface_damage(win->surface, 0, 0, 
+                               win->allocation.w, win->allocation.h);
+             wl_surface_commit(win->surface);
 
              win->server_allocation = win->allocation;
           }
@@ -471,14 +473,14 @@ ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, 
int h)
    win->allocation.w = w;
    win->allocation.h = h;
 
-   /* if (!win->transparent) */
-   /*   { */
-   /*      if (win->region.opaque) wl_region_destroy(win->region.opaque); */
-   /*      win->region.opaque =  */
-   /*        wl_compositor_create_region(_ecore_wl_disp->wl.compositor); */
-   /*      wl_region_add(win->region.opaque, win->allocation.x, 
win->allocation.y,  */
-   /*                    win->allocation.w, win->allocation.h); */
-   /*   } */
+   if ((!win->transparent) || (!win->alpha))
+     {
+        if (win->region.opaque) wl_region_destroy(win->region.opaque);
+        win->region.opaque = 
+          wl_compositor_create_region(_ecore_wl_disp->wl.compositor);
+        wl_region_add(win->region.opaque, win->allocation.x, 
win->allocation.y, 
+                      win->allocation.w, win->allocation.h);
+     }
 }
 
 EAPI void 
@@ -599,7 +601,6 @@ _ecore_wl_window_cb_configure(void *data, struct 
wl_shell_surface *shell_surface
      {
         if (win->type == ECORE_WL_WINDOW_TYPE_TOPLEVEL)
           win->edges = edges;
-
         if (win->region.input) wl_region_destroy(win->region.input);
         win->region.input = NULL;
         if (win->region.opaque) wl_region_destroy(win->region.opaque);

-- 

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1

Reply via email to