antognolli pushed a commit to branch ecore-1.7.

commit db99a6a4be7a9131487f149738fbfed669ae46e4
Author: Rafael Antognolli <[email protected]>
Date:   Mon Apr 15 16:05:42 2013 -0300

    ecore_evas/wayland: Attach the buffer before adding damage.
    
    This is required by wayland, and used to work before because of a bug on
    Wayladn 1.0.
---
 src/lib/ecore_evas/ecore_evas_wayland_shm.c |  4 +++-
 src/lib/ecore_wayland/Ecore_Wayland.h       |  1 +
 src/lib/ecore_wayland/ecore_wl_window.c     | 19 +++++++++++++------
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas_wayland_shm.c 
b/src/lib/ecore_evas/ecore_evas_wayland_shm.c
index c5a0ee5..3bf7fea 100644
--- a/src/lib/ecore_evas/ecore_evas_wayland_shm.c
+++ b/src/lib/ecore_evas/ecore_evas_wayland_shm.c
@@ -960,10 +960,12 @@ _ecore_evas_wl_render(Ecore_Evas *ee)
 
              LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
+             ecore_wl_window_buffer_attach(ee->engine.wl.win,
+                                           ee->engine.wl.buffer, 0, 0);
              EINA_LIST_FOREACH(updates, l, r) 
                ecore_wl_window_damage(ee->engine.wl.win, 
                                       r->x, r->y, r->w, r->h);
-
+             ecore_wl_window_commit(ee->engine.wl.win);
              ecore_wl_flush();
 
              evas_render_updates_free(updates);
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h 
b/src/lib/ecore_wayland/Ecore_Wayland.h
index 382414c..0ce3b62 100644
--- a/src/lib/ecore_wayland/Ecore_Wayland.h
+++ b/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -403,6 +403,7 @@ EAPI void ecore_wl_window_move(Ecore_Wl_Window *win, int x, 
int y);
 EAPI void ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int h, int 
location);
 EAPI void ecore_wl_window_damage(Ecore_Wl_Window *win, int x, int y, int w, 
int h);
 EAPI void ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer 
*buffer, int x, int y);
+EAPI void ecore_wl_window_commit(Ecore_Wl_Window *win);
 EAPI void ecore_wl_window_show(Ecore_Wl_Window *win);
 EAPI void ecore_wl_window_hide(Ecore_Wl_Window *win);
 EAPI void ecore_wl_window_raise(Ecore_Wl_Window *win);
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c 
b/src/lib/ecore_wayland/ecore_wl_window.c
index 8e6705a..22d0c22 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -270,17 +270,24 @@ ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int 
h, int location)
      }
 }
 
-EAPI void 
+EAPI void
 ecore_wl_window_damage(Ecore_Wl_Window *win, int x, int y, int w, int h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (!win) return;
-   if (win->surface) 
-     {
-        wl_surface_damage(win->surface, x, y, w, h);
-        wl_surface_commit(win->surface);
-     }
+   if (win->surface)
+     wl_surface_damage(win->surface, x, y, w, h);
+}
+
+EAPI void
+ecore_wl_window_commit(Ecore_Wl_Window *win)
+{
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+   if (!win) return;
+   if (win->surface)
+     wl_surface_commit(win->surface);
 }
 
 EAPI void 

-- 

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

Reply via email to