commit 961bded

Michael Forney  ·  2013-06-21 07:38:39 +0000 UTC
parent 4a85e65
Style
6 files changed,  +8, -45
M seat.c
M util.h
+1, -7
 1@@ -1,11 +1,10 @@
 2 # swc: Makefile.am
 3 
 4 ACLOCAL_AMFLAGS = -I m4
 5+AM_CFLAGS = $(pixman_CFLAGS)
 6 
 7 lib_LTLIBRARIES = libswc.la
 8 
 9-AM_CFLAGS = $(pixman_CFLAGS)
10-
11 libswc_la_SOURCES = \
12 	compositor.c compositor.h \
13 	util.c util.h \
14@@ -30,10 +29,5 @@ libswc_la_LIBADD = $(wayland_server_LIBS) $(udev_LIBS) $(xkbcommon_LIBS) \
15 	$(drm_LIBS) $(drm_intel_LIBS) $(gbm_LIBS) $(egl_LIBS) $(pixman_LIBS) \
16 	intel/libintel.la
17 
18-# testclient_SOURCES = \
19-# 	testclient.c
20-# 
21-# testclient_LDADD = $(wayland_client_LIBS)
22-
23 SUBDIRS = intel
24 
+1, -1
1@@ -21,7 +21,7 @@ static void get_data_device(struct wl_client * client,
2 }
3 
4 static struct wl_data_device_manager_interface
5-data_device_manager_implementation = {
6+    data_device_manager_implementation = {
7     .create_data_source = &create_data_source,
8     .get_data_device = &get_data_device
9 };
+4, -6
 1@@ -18,9 +18,8 @@ static void destroy(struct wl_client * client,
 2     wl_resource_destroy(resource);
 3 }
 4 
 5-static void add(struct wl_client * client,
 6-                       struct wl_resource * resource,
 7-                       int32_t x, int32_t y, int32_t width, int32_t height)
 8+static void add(struct wl_client * client, struct wl_resource * resource,
 9+                int32_t x, int32_t y, int32_t width, int32_t height)
10 {
11     struct swc_region * region = resource->data;
12 
13@@ -28,9 +27,8 @@ static void add(struct wl_client * client,
14                                x, y, width, height);
15 }
16 
17-static void subtract(struct wl_client * client,
18-                            struct wl_resource * resource,
19-                            int32_t x, int32_t y, int32_t width, int32_t height)
20+static void subtract(struct wl_client * client, struct wl_resource * resource,
21+                     int32_t x, int32_t y, int32_t width, int32_t height)
22 {
23     struct swc_region * region = resource->data;
24     pixman_region32_t operand;
M seat.c
+0, -11
 1@@ -194,17 +194,6 @@ static void get_keyboard(struct wl_client * client, struct wl_resource * resourc
 2 static void get_touch(struct wl_client * client, struct wl_resource * resource,
 3                uint32_t id)
 4 {
 5-    /*
 6-    struct wl_resource * client_resource;
 7-    struct swc_seat * seat = resource->data;
 8-    struct wl_touch * touch = &seat->touch;
 9-
10-    client_resource = wl_client_add_object(client, &wl_touch_interface,
11-                                           NULL, id, seat);
12-    client_resource->destroy = &swc_unbind_resource;
13-
14-    wl_list_insert(&touch->resources, &client_resource->link);
15-    */
16 }
17 
18 struct wl_seat_interface seat_implementation = {
+2, -9
 1@@ -44,8 +44,6 @@ static void attach(struct wl_client * client, struct wl_resource * resource,
 2 {
 3     struct swc_surface * surface = resource->data;
 4 
 5-    printf("surface_attach\n");
 6-
 7     surface->pending.x = x;
 8     surface->pending.y = y;
 9 
10@@ -69,7 +67,6 @@ static void attach(struct wl_client * client, struct wl_resource * resource,
11 static void damage(struct wl_client * client, struct wl_resource * resource,
12                    int32_t x, int32_t y, int32_t width, int32_t height)
13 {
14-    printf("surface_damage\n");
15     struct swc_surface * surface = resource->data;
16 
17     pixman_region32_union_rect(&surface->pending.state.damage,
18@@ -83,8 +80,6 @@ static void frame(struct wl_client * client, struct wl_resource * resource,
19     struct swc_surface * surface = resource->data;
20     struct wl_resource * callback_resource;
21 
22-    printf("surface_frame\n");
23-
24     callback_resource = wl_client_add_object(client, &wl_callback_interface,
25                                              NULL, id, NULL);
26     wl_list_insert(surface->pending.state.frame_callbacks.prev,
27@@ -97,7 +92,7 @@ static void set_opaque_region(struct wl_client * client,
28 {
29     struct swc_surface * surface = resource->data;
30 
31-    printf("surface_set_opaque_region\n");
32+    //printf("surface_set_opaque_region\n");
33 
34     if (region_resource)
35     {
36@@ -115,7 +110,7 @@ static void set_input_region(struct wl_client * client,
37 {
38     struct swc_surface * surface = resource->data;
39 
40-    printf("surface_set_input_region\n");
41+    printf("surface.set_input_region\n");
42 
43     if (region_resource)
44     {
45@@ -132,8 +127,6 @@ static void commit(struct wl_client * client, struct wl_resource * resource)
46     struct swc_surface * surface = resource->data;
47     struct swc_event event;
48 
49-    printf("surface_commit\n");
50-
51     event.data = surface;
52 
53     if (surface->pending.state.buffer != surface->state.buffer)
M util.h
+0, -11
 1@@ -3,17 +3,6 @@
 2 
 3 #include <wayland-server.h>
 4 
 5-/*
 6-void swc_object_init(struct wl_object * object,
 7-                     const struct wl_interface * interface,
 8-                     const void * implementation, uint32_t id);
 9-
10-void swc_resource_init(struct wl_resource * resource,
11-                       struct wl_client * client, 
12-
13-void swc_client_add_object(struct wl_clientstruct wl_resource * resource, );
14-*/
15-
16 void swc_unbind_resource(struct wl_resource * resource);
17 
18 struct wl_resource * swc_find_resource_for_client(struct wl_list * resources,