swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 7bade72a95dd81d2cd2afac686e3dd923089bf25
parent 4ee14f5f55237fddc6a6c75796df76d159d53e61
Author: Michael Forney <mforney@mforney.org>
Date:   Mon, 24 Feb 2014 01:09:49 -0800

Style

Diffstat:
Mlibswc/pointer.c | 4+---
Mlibswc/surface.c | 11+++++------
2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/libswc/pointer.c b/libswc/pointer.c @@ -129,6 +129,7 @@ static const struct view_impl view_impl = { .attach = &attach, .move = &move, }; + static inline void update_cursor(struct pointer * pointer) { view_move(&pointer->cursor.view, @@ -255,9 +256,6 @@ void pointer_finalize(struct pointer * pointer) pixman_region32_fini(&pointer->region); } -/** - * Sets the focus of the pointer to the specified surface. - */ void pointer_set_focus(struct pointer * pointer, struct swc_surface * surface) { input_focus_set(&pointer->focus, surface); diff --git a/libswc/surface.c b/libswc/surface.c @@ -58,7 +58,7 @@ static void state_initialize(struct swc_surface_state * state) wl_list_init(&state->frame_callbacks); } -static void state_finish(struct swc_surface_state * state) +static void state_finalize(struct swc_surface_state * state) { struct wl_resource * resource, * tmp; @@ -252,7 +252,7 @@ static void commit(struct wl_client * client, struct wl_resource * resource) if (surface->view) { if (surface->pending.commit & SWC_SURFACE_COMMIT_ATTACH) - view_attach(surface->view, surface->state.buffer); + view_attach(surface->view, buffer); view_update(surface->view); } @@ -287,9 +287,8 @@ static void surface_destroy(struct wl_resource * resource) { struct swc_surface * surface = wl_resource_get_user_data(resource); - /* Finish the surface. */ - state_finish(&surface->state); - state_finish(&surface->pending.state); + state_finalize(&surface->state); + state_finalize(&surface->pending.state); if (surface->view) wl_list_remove(&surface->view_listener.link); @@ -404,7 +403,7 @@ void swc_surface_set_view(struct swc_surface * surface, struct view * view) { wl_signal_add(&view->event_signal, &surface->view_listener); view_attach(view, surface->state.buffer); - view_update(surface->view); + view_update(view); } }