commit 1429271

Michael Forney  ·  2014-02-08 07:40:11 +0000 UTC
parent 56c02bd
Style, remove extraneous debug statements.
8 files changed,  +11, -19
+0, -1
1@@ -15,7 +15,6 @@ CFLAGS          = -pipe
2 # WAYLAND_SCANNER = wayland-scanner
3 
4 ENABLE_DEBUG        = 1
5-
6 ENABLE_STATIC       = 1
7 ENABLE_SHARED       = 1
8 ENABLE_HOTPLUGGING  = 1
+2, -5
 1@@ -566,8 +566,6 @@ void swc_compositor_surface_show(struct swc_surface * surface)
 2     if (view->visible)
 3         return;
 4 
 5-    printf("showing surface %u\n", wl_resource_get_id(surface->resource));
 6-
 7     /* Assume worst-case no clipping until we draw the next frame (in case the
 8      * surface gets moved before that. */
 9     pixman_region32_clear(&view->clip);
10@@ -591,8 +589,8 @@ void swc_compositor_surface_hide(struct swc_surface * surface)
11 
12     /* Update all the screens the view was on. */
13     update(&view->base);
14-
15     damage_below_view(view);
16+
17     wl_list_remove(&view->link);
18     swc_view_set_screens(&view->base, 0);
19     view->visible = false;
20@@ -793,14 +791,13 @@ bool handle_motion(struct swc_pointer * pointer, uint32_t time)
21 
22 static void handle_terminate(uint32_t time, uint32_t value, void * data)
23 {
24-    printf("handling terminate\n");
25     wl_display_terminate(swc.display);
26 }
27 
28 static void handle_switch_vt(uint32_t time, uint32_t value, void * data)
29 {
30     uint8_t vt = value - XKB_KEY_XF86Switch_VT_1 + 1;
31-    printf("handle switch vt%u\n", vt);
32+
33     swc_launch_activate_vt(vt);
34 }
35 
+1, -1
 1@@ -35,9 +35,9 @@ struct swc_framebuffer_plane
 2     drmModeCrtcPtr original_crtc_state;
 3     struct swc_mode mode;
 4     struct swc_view view;
 5-    struct swc_drm_handler drm_handler;
 6     struct wl_array connectors;
 7     bool need_modeset;
 8+    struct swc_drm_handler drm_handler;
 9 };
10 
11 bool swc_framebuffer_plane_initialize(struct swc_framebuffer_plane * plane,
+0, -4
 1@@ -50,7 +50,6 @@ static void enter(struct swc_input_focus_handler * handler,
 2     surface_x = pointer->x - wl_fixed_from_int(surface->view->geometry.x);
 3     surface_y = pointer->y - wl_fixed_from_int(surface->view->geometry.y);
 4 
 5-    printf("-> pointer.enter: %p (%d, %d)\n", resource, surface_x, surface_y);
 6     wl_pointer_send_enter(resource, serial, surface->resource,
 7                           surface_x, surface_y);
 8 }
 9@@ -66,7 +65,6 @@ static void leave(struct swc_input_focus_handler * handler,
10     display = wl_client_get_display(client);
11     serial = wl_display_next_serial(display);
12 
13-    printf("-> pointer.leave: %p\n", resource);
14     wl_pointer_send_leave(resource, serial, surface->resource);
15 }
16 
17@@ -315,8 +313,6 @@ struct wl_resource * swc_pointer_bind(struct swc_pointer * pointer,
18 {
19     struct wl_resource * client_resource;
20 
21-    printf("pointer: adding client %p\n", client);
22-
23     client_resource = wl_resource_create(client, &wl_pointer_interface, 1, id);
24     wl_resource_set_implementation(client_resource, &pointer_implementation,
25                                    pointer, &unbind);
+1, -0
1@@ -42,6 +42,7 @@ struct screen_modifier
2     void (* modify)(struct screen_modifier * modifier,
3                     const struct swc_rectangle * geometry,
4                     struct pixman_region32 * usable);
5+
6     struct wl_list link;
7 };
8 
+6, -6
 1@@ -198,18 +198,18 @@ struct swc_shell_surface * swc_shell_surface_new
 2     if (!shell_surface)
 3         goto error0;
 4 
 5-    window_initialize(&shell_surface->window, &shell_window_impl, surface);
 6-    shell_surface->type = SHELL_SURFACE_TYPE_UNSPECIFIED;
 7-    shell_surface->surface_destroy_listener.notify = &handle_surface_destroy;
 8-    wl_resource_add_destroy_listener(surface->resource,
 9-                                     &shell_surface->surface_destroy_listener);
10-
11     shell_surface->resource = wl_resource_create
12         (client, &wl_shell_surface_interface, 1, id);
13 
14     if (!shell_surface->resource)
15         goto error1;
16 
17+    window_initialize(&shell_surface->window, &shell_window_impl, surface);
18+    shell_surface->type = SHELL_SURFACE_TYPE_UNSPECIFIED;
19+    shell_surface->surface_destroy_listener.notify = &handle_surface_destroy;
20+    wl_resource_add_destroy_listener(surface->resource,
21+                                     &shell_surface->surface_destroy_listener);
22+
23     wl_resource_set_implementation(shell_surface->resource,
24                                    &shell_surface_implementation,
25                                    shell_surface, &destroy_shell_surface);
+0, -1
1@@ -289,7 +289,6 @@ static void surface_destroy(struct wl_resource * resource)
2     if (surface->view)
3         wl_list_remove(&surface->view_listener.link);
4 
5-    printf("freeing surface %p\n", surface);
6     free(surface);
7 }
8 
+1, -1
1@@ -136,7 +136,7 @@ bool swc_xkb_update_keymap(struct swc_xkb * xkb)
2     }
3 
4     xkb->keymap.area = mmap(NULL, xkb->keymap.size, PROT_READ | PROT_WRITE,
5-        MAP_SHARED, xkb->keymap.fd, 0);
6+                            MAP_SHARED, xkb->keymap.fd, 0);
7 
8     if (xkb->keymap.area == MAP_FAILED)
9     {