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