x11: bug fix
authorjh01.j <jh01.j@samsung.com>
Thu, 11 Jun 2015 05:46:23 +0000 (14:46 +0900)
committerTaekyun Kim <tkq.kim@samsung.com>
Tue, 7 Jul 2015 06:56:50 +0000 (15:56 +0900)
    - input: bug fix
    - output: add pepper_pixman_renderer_set_target() function

Change-Id: I919db33f5ade8134545c1e0d9792a93b8b52c278

x11/src/x11-input.c
x11/src/x11-output.c

index c214fc7..a4a91ca 100644 (file)
@@ -206,7 +206,7 @@ pepper_x11_seat_create(pepper_x11_connection_t* conn)
     /* Hard-coded: */
     seat->caps |= WL_SEAT_CAPABILITY_POINTER;
     seat->caps |= WL_SEAT_CAPABILITY_KEYBOARD;
-    wl_signal_emit(&seat->capabilities_signal, seat->base);
+    wl_signal_emit(&seat->capabilities_signal, seat);
 
     /* x-connection has only 1 seat */
     conn->seat = seat;
index 090f29e..0d6c605 100644 (file)
@@ -458,6 +458,9 @@ x11_output_repaint_shm(x11_output_t* output)
     xcb_void_cookie_t    cookie;
     xcb_generic_error_t *err;
 
+    pepper_pixman_renderer_set_target(output->renderer, output->shm.image);
+    pepper_renderer_repaint_output(output->renderer, output->base);
+
     /* TODO: Set clipping area from damages
      *       pixman_region32_rectangles(...);
      *       xcb_set_clip_rectangles(...);
@@ -487,12 +490,19 @@ x11_output_repaint_shm(x11_output_t* output)
 }
 
 static void
+x11_output_repaint_gl(x11_output_t* output)
+{
+    pepper_renderer_repaint_output(output->renderer, output->base);
+
+    /* TODO: */
+    PEPPER_ERROR("TODO : GL\n");
+}
+
+static void
 x11_output_repaint(void *o)
 {
     x11_output_t *output = o;
 
-    pepper_renderer_repaint_output(output->renderer, output->base);
-
     /* FIXME: hack, only pixman-render use shm.image */
     if (output->shm.image)
     {
@@ -500,8 +510,7 @@ x11_output_repaint(void *o)
     }
     else
     {
-        /* TODO: gl case */
-        PEPPER_ERROR("TODO : GL\n");
+        x11_output_repaint_gl(output);
     }
 
     /* XXX: frame_done callback called after 10ms, referenced from weston */