swc

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

commit 9495eecdf99a858d5b66f20f0127dd97f79acbb6
parent 255b466a9a4b46ec8a935159f4173b5c72315e20
Author: Michael Forney <mforney@mforney.org>
Date:   Sat, 21 Dec 2013 12:54:16 -0800

Move compositor view to compositor.c

Diffstat:
Mlibswc/compositor.c | 342+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Mlibswc/compositor.h | 8++++++--
Dlibswc/compositor_surface.c | 341-------------------------------------------------------------------------------
Dlibswc/compositor_surface.h | 70----------------------------------------------------------------------
Mlibswc/local.mk | 1-
Mlibswc/shell_surface.c | 4++--
Mlibswc/window.c | 1-
Mlibswc/xwm.c | 2+-
8 files changed, 345 insertions(+), 424 deletions(-)

diff --git a/libswc/compositor.c b/libswc/compositor.c @@ -1,6 +1,5 @@ #include "swc.h" #include "compositor.h" -#include "compositor_surface.h" #include "cursor_surface.h" #include "data_device_manager.h" #include "drm.h" @@ -20,6 +19,29 @@ #include <wld/drm.h> #include <xkbcommon/xkbcommon-keysyms.h> +struct surface_state +{ + struct swc_compositor * compositor; + + /* The box that the surface covers (including it's border). */ + pixman_box32_t extents; + + /* The region that is covered by opaque regions of surfaces above this + * surface. */ + pixman_region32_t clip; + + struct + { + uint32_t width; + uint32_t color; + bool damaged; + } border; + + bool mapped; + + struct wl_listener event_listener; +}; + /* Rendering {{{ */ struct buffer_state @@ -93,7 +115,7 @@ static void repaint_surface(struct render_target * target, pixman_region32_t border_damage; pixman_region32_t surface_region; struct buffer_state * state; - struct swc_compositor_surface_state * surface_state = surface->view_state; + struct surface_state * surface_state = surface->view_state; if (!surface->state.buffer) return; @@ -174,8 +196,8 @@ static void renderer_repaint(struct render_target * target, wld_flush(target->drawable); } -void swc_compositor_attach(struct swc_surface * surface, - struct wl_resource * resource) +static void renderer_attach(struct swc_surface * surface, + struct wl_resource * resource) { struct buffer_state * state; struct wl_shm_buffer * shm_buffer; @@ -244,10 +266,318 @@ static void renderer_flush_surface(struct swc_surface * surface) /* }}} */ +/* Surface Views {{{ */ + +/** + * Adds damage from the region below a surface, taking into account it's clip + * region, to the region specified by `damage'. + */ +static void damage_below_surface(struct swc_surface * surface) +{ + struct swc_compositor * compositor = CONTAINER_OF + (surface->view, typeof(*compositor), compositor_view); + struct surface_state * state = surface->view_state; + pixman_region32_t damage_below; + + pixman_region32_init_with_extents(&damage_below, &state->extents); + pixman_region32_subtract(&damage_below, &damage_below, &state->clip); + pixman_region32_union(&compositor->damage, &compositor->damage, + &damage_below); + pixman_region32_fini(&damage_below); +} + +/** + * Completely damages the surface and its border. + */ +static void damage_surface(struct swc_surface * surface) +{ + struct surface_state * state = surface->view_state; + printf("damaging surface\n"); + + pixman_region32_fini(&surface->state.damage); + pixman_region32_init_rect(&surface->state.damage, 0, 0, + surface->geometry.width, + surface->geometry.height); + state->border.damaged = true; +} + +static void update_extents(struct swc_surface * surface) +{ + struct surface_state * state = surface->view_state; + + state->extents.x1 = surface->geometry.x - state->border.width; + state->extents.y1 = surface->geometry.y - state->border.width; + state->extents.x2 = surface->geometry.x + surface->geometry.width + + state->border.width; + state->extents.y2 = surface->geometry.y + surface->geometry.height + + state->border.width; + + /* Damage border. */ + state->border.damaged = true; +} + +static void update_outputs(struct swc_surface * surface) +{ + struct swc_compositor * compositor = CONTAINER_OF + (surface->view, typeof(*compositor), compositor_view); + struct surface_state * state = surface->view_state; + uint32_t old_outputs = surface->outputs, new_outputs = 0, + entered_outputs, left_outputs, changed_outputs; + struct swc_output * output; + struct wl_client * client; + struct wl_resource * resource; + + if (state->mapped) + { + wl_list_for_each(output, &compositor->outputs, link) + { + if (swc_rectangle_overlap(&output->geometry, &surface->geometry)) + new_outputs |= SWC_OUTPUT_MASK(output); + } + } + + if (new_outputs == old_outputs) + return; + + entered_outputs = new_outputs & ~old_outputs; + left_outputs = old_outputs & ~new_outputs; + changed_outputs = old_outputs ^ new_outputs; + + wl_list_for_each(output, &compositor->outputs, link) + { + if (!(changed_outputs & SWC_OUTPUT_MASK(output))) + continue; + + client = wl_resource_get_client(surface->resource); + resource = wl_resource_find_for_client(&output->resources, client); + + if (resource) + { + if (entered_outputs & SWC_OUTPUT_MASK(output)) + wl_surface_send_enter(surface->resource, resource); + else if (left_outputs & SWC_OUTPUT_MASK(output)) + wl_surface_send_leave(surface->resource, resource); + } + } + + surface->outputs = new_outputs; +} + +static void update(struct swc_surface * surface); + +static void handle_surface_event(struct wl_listener * listener, void * data) +{ + struct surface_state * state + = CONTAINER_OF(listener, typeof(*state), event_listener); + struct swc_event * event = data; + struct swc_surface_event_data * event_data = event->data; + struct swc_surface * surface = event_data->surface; + + switch (event->type) + { + case SWC_SURFACE_EVENT_TYPE_RESIZE: + damage_below_surface(surface); + + update_extents(surface); + update(surface); + update_outputs(surface); + + break; + } +} + +static bool add(struct swc_surface * surface) +{ + struct swc_compositor * compositor = CONTAINER_OF + (surface->view, typeof(*compositor), compositor_view); + struct surface_state * state; + + state = malloc(sizeof *state); + + if (!state) + return false; + + state->compositor = compositor; + state->extents.x1 = surface->geometry.x; + state->extents.y1 = surface->geometry.y; + state->extents.x2 = surface->geometry.x + surface->geometry.width; + state->extents.y2 = surface->geometry.y + surface->geometry.height; + state->border.width = 0; + state->border.color = 0x000000; + state->border.damaged = false; + state->mapped = false; + state->event_listener.notify = &handle_surface_event; + + wl_signal_add(&surface->event_signal, &state->event_listener); + + pixman_region32_init(&state->clip); + + surface->view_state = state; + + return true; +} + +static void remove_(struct swc_surface * surface) +{ + struct swc_compositor * compositor = CONTAINER_OF + (surface->view, typeof(*compositor), compositor_view); + struct surface_state * state = surface->view_state; + + swc_compositor_surface_hide(surface); + + wl_list_remove(&state->event_listener.link); + pixman_region32_fini(&state->clip); + + free(state); +} + +static void attach(struct swc_surface * surface, struct wl_resource * resource) +{ + renderer_attach(surface, resource); +} + +static void update(struct swc_surface * surface) +{ + struct swc_compositor * compositor = CONTAINER_OF + (surface->view, typeof(*compositor), compositor_view); + struct surface_state * state = surface->view_state; + struct swc_output * output; + + if (!state->mapped) + return; + + wl_list_for_each(output, &compositor->outputs, link) + { + if (surface->outputs & SWC_OUTPUT_MASK(output)) + swc_compositor_schedule_update(compositor, output); + } +} + +static void move(struct swc_surface * surface, int32_t x, int32_t y) +{ + struct swc_compositor * compositor = CONTAINER_OF + (surface->view, typeof(*compositor), compositor_view); + struct surface_state * state = surface->view_state; + + if (x == surface->geometry.x && y == surface->geometry.y) + return; + + if (state->mapped) + damage_below_surface(surface); + + surface->geometry.x = x; + surface->geometry.y = y; + + update_extents(surface); + + if (state->mapped) + { + /* Assume worst-case no clipping until we draw the next frame (in case + * the surface gets moved again before that). */ + pixman_region32_init(&state->clip); + + damage_below_surface(surface); + update(surface); + update_outputs(surface); + update(surface); + } +} + +const struct swc_view_impl view_impl = { + .add = &add, + .remove = &remove_, + .attach = &attach, + .update = &update, + .move = &move +}; + +void swc_compositor_surface_show(struct swc_surface * surface) +{ + struct swc_compositor * compositor = CONTAINER_OF + (surface->view, typeof(*compositor), compositor_view); + struct surface_state * state = surface->view_state; + + if (surface->view->impl != &view_impl) + return; + + if (state->mapped) + return; + + printf("showing surface %u\n", wl_resource_get_id(surface->resource)); + + state->mapped = true; + + /* Assume worst-case no clipping until we draw the next frame (in case the + * surface gets moved before that. */ + pixman_region32_clear(&state->clip); + + damage_surface(surface); + update_outputs(surface); + update(surface); + wl_list_insert(&compositor->surfaces, &surface->link); +} + +void swc_compositor_surface_hide(struct swc_surface * surface) +{ + struct swc_compositor * compositor = CONTAINER_OF + (surface->view, typeof(*compositor), compositor_view); + struct surface_state * state = surface->view_state; + + if (surface->view->impl != &view_impl) + return; + + if (!state->mapped) + return; + + /* Update all the outputs the surface was on. */ + update(surface); + + state->mapped = false; + + damage_below_surface(surface); + update_outputs(surface); + wl_list_remove(&surface->link); +} + +void swc_compositor_surface_set_border_width(struct swc_surface * surface, + uint32_t width) +{ + struct surface_state * state = surface->view_state; + + if (state->border.width == width) + return; + + state->border.width = width; + state->border.damaged = true; + + /* XXX: Damage above surface for transparent surfaces? */ + + update_extents(surface); + update(surface); +} + +void swc_compositor_surface_set_border_color(struct swc_surface * surface, + uint32_t color) +{ + struct surface_state * state = surface->view_state; + + if (state->border.color == color) + return; + + state->border.color = color; + state->border.damaged = true; + + /* XXX: Damage above surface for transparent surfaces? */ + + update(surface); +} + +/* }}} */ + static void calculate_damage(struct swc_compositor * compositor) { struct swc_surface * surface; - struct swc_compositor_surface_state * state; + struct surface_state * state; pixman_region32_t surface_opaque; pixman_region32_clear(&compositor->opaque); @@ -561,7 +891,7 @@ bool swc_compositor_initialize(struct swc_compositor * compositor, compositor->pointer_listener.notify = &handle_pointer_event; compositor->scheduled_updates = 0; compositor->pending_flips = 0; - compositor->compositor_view.impl = &swc_compositor_view_impl; + compositor->compositor_view.impl = &view_impl; compositor->cursor_view.impl = &swc_cursor_view_impl; compositor->pointer_handler = (struct swc_pointer_handler) { .focus = &handle_focus, diff --git a/libswc/compositor.h b/libswc/compositor.h @@ -51,8 +51,12 @@ void swc_compositor_add_globals(struct swc_compositor * compositor, void swc_compositor_schedule_update(struct swc_compositor * compositor, struct swc_output * output); -void swc_compositor_attach(struct swc_surface * surface, - struct wl_resource * resource); +void swc_compositor_surface_show(struct swc_surface * surface); +void swc_compositor_surface_hide(struct swc_surface * surface); +void swc_compositor_surface_set_border_color(struct swc_surface * surface, + uint32_t color); +void swc_compositor_surface_set_border_width(struct swc_surface * surface, + uint32_t width); #endif diff --git a/libswc/compositor_surface.c b/libswc/compositor_surface.c @@ -1,341 +0,0 @@ -/* swc: compositor_surface.c - * - * Copyright (c) 2013 Michael Forney - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include "compositor_surface.h" -#include "compositor.h" -#include "event.h" -#include "output.h" -#include "util.h" - -#include <stdio.h> -#include <stdlib.h> - -static bool add(struct swc_surface * surface); -static void remove_(struct swc_surface * surface); -static void attach(struct swc_surface * surface, struct wl_resource * resource); -static void update(struct swc_surface * surface); -static void move(struct swc_surface * surface, int32_t x, int32_t y); - -const struct swc_view_impl swc_compositor_view_impl = { - .add = &add, - .remove = &remove_, - .attach = &attach, - .update = &update, - .move = &move -}; - -/** - * Adds damage from the region below a surface, taking into account it's clip - * region, to the region specified by `damage'. - */ -static void damage_below_surface(struct swc_surface * surface) -{ - struct swc_compositor * compositor = CONTAINER_OF - (surface->view, typeof(*compositor), compositor_view); - struct swc_compositor_surface_state * state = surface->view_state; - pixman_region32_t damage_below; - - pixman_region32_init_with_extents(&damage_below, &state->extents); - pixman_region32_subtract(&damage_below, &damage_below, &state->clip); - pixman_region32_union(&compositor->damage, &compositor->damage, - &damage_below); - pixman_region32_fini(&damage_below); -} - -/** - * Completely damages the surface and its border. - */ -static void damage_surface(struct swc_surface * surface) -{ - struct swc_compositor_surface_state * state = surface->view_state; - printf("damaging surface\n"); - - pixman_region32_fini(&surface->state.damage); - pixman_region32_init_rect(&surface->state.damage, 0, 0, - surface->geometry.width, - surface->geometry.height); - state->border.damaged = true; -} - -static void update_extents(struct swc_surface * surface) -{ - struct swc_compositor_surface_state * state = surface->view_state; - - state->extents.x1 = surface->geometry.x - state->border.width; - state->extents.y1 = surface->geometry.y - state->border.width; - state->extents.x2 = surface->geometry.x + surface->geometry.width - + state->border.width; - state->extents.y2 = surface->geometry.y + surface->geometry.height - + state->border.width; - - /* Damage border. */ - state->border.damaged = true; -} - -static void update_outputs(struct swc_surface * surface) -{ - struct swc_compositor * compositor = CONTAINER_OF - (surface->view, typeof(*compositor), compositor_view); - struct swc_compositor_surface_state * state = surface->view_state; - uint32_t old_outputs = surface->outputs, new_outputs = 0, - entered_outputs, left_outputs, changed_outputs; - struct swc_output * output; - struct wl_client * client; - struct wl_resource * resource; - - if (state->mapped) - { - wl_list_for_each(output, &compositor->outputs, link) - { - if (swc_rectangle_overlap(&output->geometry, &surface->geometry)) - new_outputs |= SWC_OUTPUT_MASK(output); - } - } - - if (new_outputs == old_outputs) - return; - - entered_outputs = new_outputs & ~old_outputs; - left_outputs = old_outputs & ~new_outputs; - changed_outputs = old_outputs ^ new_outputs; - - wl_list_for_each(output, &compositor->outputs, link) - { - if (!(changed_outputs & SWC_OUTPUT_MASK(output))) - continue; - - client = wl_resource_get_client(surface->resource); - resource = wl_resource_find_for_client(&output->resources, client); - - if (resource) - { - if (entered_outputs & SWC_OUTPUT_MASK(output)) - wl_surface_send_enter(surface->resource, resource); - else if (left_outputs & SWC_OUTPUT_MASK(output)) - wl_surface_send_leave(surface->resource, resource); - } - } - - surface->outputs = new_outputs; -} - -static void handle_surface_event(struct wl_listener * listener, void * data) -{ - struct swc_compositor_surface_state * state - = CONTAINER_OF(listener, typeof(*state), event_listener); - struct swc_event * event = data; - struct swc_surface_event_data * event_data = event->data; - struct swc_surface * surface = event_data->surface; - - switch (event->type) - { - case SWC_SURFACE_EVENT_TYPE_RESIZE: - damage_below_surface(surface); - - update_extents(surface); - update(surface); - update_outputs(surface); - - break; - } -} - -/* Compositor view */ -bool add(struct swc_surface * surface) -{ - struct swc_compositor * compositor = CONTAINER_OF - (surface->view, typeof(*compositor), compositor_view); - struct swc_compositor_surface_state * state; - - state = malloc(sizeof *state); - - if (!state) - return false; - - state->compositor = compositor; - state->extents.x1 = surface->geometry.x; - state->extents.y1 = surface->geometry.y; - state->extents.x2 = surface->geometry.x + surface->geometry.width; - state->extents.y2 = surface->geometry.y + surface->geometry.height; - state->border.width = 0; - state->border.color = 0x000000; - state->border.damaged = false; - state->mapped = false; - state->event_listener.notify = &handle_surface_event; - - wl_signal_add(&surface->event_signal, &state->event_listener); - - pixman_region32_init(&state->clip); - - surface->view_state = state; - - return true; -} - -void remove_(struct swc_surface * surface) -{ - struct swc_compositor * compositor = CONTAINER_OF - (surface->view, typeof(*compositor), compositor_view); - struct swc_compositor_surface_state * state = surface->view_state; - - swc_compositor_surface_hide(surface); - - wl_list_remove(&state->event_listener.link); - pixman_region32_fini(&state->clip); - - free(state); -} - -void attach(struct swc_surface * surface, struct wl_resource * resource) -{ - swc_compositor_attach(surface, resource); -} - -void update(struct swc_surface * surface) -{ - struct swc_compositor * compositor = CONTAINER_OF - (surface->view, typeof(*compositor), compositor_view); - struct swc_compositor_surface_state * state = surface->view_state; - struct swc_output * output; - - if (!state->mapped) - return; - - wl_list_for_each(output, &compositor->outputs, link) - { - if (surface->outputs & SWC_OUTPUT_MASK(output)) - swc_compositor_schedule_update(compositor, output); - } -} - -void move(struct swc_surface * surface, int32_t x, int32_t y) -{ - struct swc_compositor * compositor = CONTAINER_OF - (surface->view, typeof(*compositor), compositor_view); - struct swc_compositor_surface_state * state = surface->view_state; - - if (x == surface->geometry.x && y == surface->geometry.y) - return; - - if (state->mapped) - damage_below_surface(surface); - - surface->geometry.x = x; - surface->geometry.y = y; - - update_extents(surface); - - if (state->mapped) - { - /* Assume worst-case no clipping until we draw the next frame (in case - * the surface gets moved again before that). */ - pixman_region32_init(&state->clip); - - damage_below_surface(surface); - update(surface); - update_outputs(surface); - update(surface); - } -} - -void swc_compositor_surface_show(struct swc_surface * surface) -{ - struct swc_compositor * compositor = CONTAINER_OF - (surface->view, typeof(*compositor), compositor_view); - struct swc_compositor_surface_state * state = surface->view_state; - - if (surface->view->impl != &swc_compositor_view_impl) - return; - - if (state->mapped) - return; - - printf("showing surface %u\n", wl_resource_get_id(surface->resource)); - - state->mapped = true; - - /* Assume worst-case no clipping until we draw the next frame (in case the - * surface gets moved before that. */ - pixman_region32_clear(&state->clip); - - damage_surface(surface); - update_outputs(surface); - update(surface); - wl_list_insert(&compositor->surfaces, &surface->link); -} - -void swc_compositor_surface_hide(struct swc_surface * surface) -{ - struct swc_compositor * compositor = CONTAINER_OF - (surface->view, typeof(*compositor), compositor_view); - struct swc_compositor_surface_state * state = surface->view_state; - - if (surface->view->impl != &swc_compositor_view_impl) - return; - - if (!state->mapped) - return; - - /* Update all the outputs the surface was on. */ - update(surface); - - state->mapped = false; - - damage_below_surface(surface); - update_outputs(surface); - wl_list_remove(&surface->link); -} - -void swc_compositor_surface_set_border_width(struct swc_surface * surface, - uint32_t width) -{ - struct swc_compositor_surface_state * state = surface->view_state; - - if (state->border.width == width) - return; - - state->border.width = width; - state->border.damaged = true; - - /* XXX: Damage above surface for transparent surfaces? */ - - update_extents(surface); - update(surface); -} - -void swc_compositor_surface_set_border_color(struct swc_surface * surface, - uint32_t color) -{ - struct swc_compositor_surface_state * state = surface->view_state; - - if (state->border.color == color) - return; - - state->border.color = color; - state->border.damaged = true; - - /* XXX: Damage above surface for transparent surfaces? */ - - update(surface); -} - diff --git a/libswc/compositor_surface.h b/libswc/compositor_surface.h @@ -1,70 +0,0 @@ -/* swc: compositor_surface.h - * - * Copyright (c) 2013 Michael Forney - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef SWC_COMPOSITOR_SURFACE_H -#define SWC_COMPOSITOR_SURFACE_H - -#include "view.h" - -#include <wayland-server.h> -#include <pixman.h> - -struct swc_surface; - -struct swc_compositor_surface_state -{ - struct swc_compositor * compositor; - - /* The box that the surface covers (including it's border). */ - pixman_box32_t extents; - - /* The region that is covered by opaque regions of surfaces above this - * surface. */ - pixman_region32_t clip; - - struct - { - uint32_t width; - uint32_t color; - bool damaged; - } border; - - bool mapped; - - struct wl_listener event_listener; -}; - -extern const struct swc_view_impl swc_compositor_view_impl; - -void swc_compositor_surface_show(struct swc_surface * surface); - -void swc_compositor_surface_hide(struct swc_surface * surface); - -void swc_compositor_surface_set_border_width(struct swc_surface * surface, - uint32_t width); - -void swc_compositor_surface_set_border_color(struct swc_surface * surface, - uint32_t color); - -#endif - diff --git a/libswc/local.mk b/libswc/local.mk @@ -34,7 +34,6 @@ SWC_SOURCES = \ libswc/output.c \ libswc/plane.c \ libswc/surface.c \ - libswc/compositor_surface.c \ libswc/cursor_surface.c \ libswc/region.c \ libswc/input_focus.c \ diff --git a/libswc/shell_surface.c b/libswc/shell_surface.c @@ -21,9 +21,9 @@ * SOFTWARE. */ -#include "swc.h" -#include "compositor_surface.h" #include "shell_surface.h" +#include "compositor.h" +#include "swc.h" #include "surface.h" #include "util.h" #include "window.h" diff --git a/libswc/window.c b/libswc/window.c @@ -23,7 +23,6 @@ #include "window.h" #include "compositor.h" -#include "compositor_surface.h" #include "event.h" #include "internal.h" #include "keyboard.h" diff --git a/libswc/xwm.c b/libswc/xwm.c @@ -22,7 +22,7 @@ */ #include "xwm.h" -#include "compositor_surface.h" +#include "compositor.h" #include "internal.h" #include "surface.h" #include "swc.h"