[clutter/fosdem-2012] test-wayland-surface: forward damage to surface actor



commit 4b54db98ccefc5d4bd18e7ce79ac8c9a6ca17d50
Author: Robert Bragg <robert linux intel com>
Date:   Mon Jan 9 19:06:05 2012 +0000

    test-wayland-surface: forward damage to surface actor
    
    This ensures we now forward the damage events from clients onto the
    corresponding ClutterWaylandSurface actors.

 tests/interactive/test-wayland-surface.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/tests/interactive/test-wayland-surface.c b/tests/interactive/test-wayland-surface.c
index 88d4278..0068361 100644
--- a/tests/interactive/test-wayland-surface.c
+++ b/tests/interactive/test-wayland-surface.c
@@ -339,12 +339,21 @@ tws_surface_attach_buffer (struct wl_client *wayland_client,
 
 static void
 tws_surface_damage (struct wl_client *client,
-                    struct wl_resource *resource,
+                    struct wl_resource *surface_resource,
                     gint32 x,
                     gint32 y,
                     gint32 width,
                     gint32 height)
 {
+  TWSSurface *surface = surface_resource->data;
+  if (surface->buffer)
+    {
+      clutter_wayland_surface_damage_buffer (CLUTTER_WAYLAND_SURFACE (surface->actor),
+                                             surface->buffer->wayland_buffer,
+                                             x, y, width, height);
+    }
+  g_warning ("Damage");
+
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]