aboutsummaryrefslogtreecommitdiff
path: root/examples/compositor
diff options
context:
space:
mode:
Diffstat (limited to 'examples/compositor')
-rw-r--r--examples/compositor/main.c1
-rw-r--r--examples/compositor/wl_compositor.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/examples/compositor/main.c b/examples/compositor/main.c
index 7ac549e5..fd592600 100644
--- a/examples/compositor/main.c
+++ b/examples/compositor/main.c
@@ -42,6 +42,7 @@ void handle_output_frame(struct output_state *output, struct timespec *ts) {
float matrix[16];
wl_list_for_each(_res, &sample->compositor.surfaces, link) {
struct wlr_surface *surface = wl_resource_get_user_data(_res);
+ wlr_surface_flush_damage(surface);
if (surface->texture->valid) {
wlr_texture_get_matrix(surface->texture, &matrix,
&wlr_output->transform_matrix, 200, 200);
diff --git a/examples/compositor/wl_compositor.c b/examples/compositor/wl_compositor.c
index 66c069ba..e25dddac 100644
--- a/examples/compositor/wl_compositor.c
+++ b/examples/compositor/wl_compositor.c
@@ -3,6 +3,7 @@
#include <wayland-server.h>
#include <wlr/util/log.h>
#include <wlr/types/wlr_surface.h>
+#include <wlr/types/wlr_region.h>
#include "compositor.h"
static void destroy_surface_listener(struct wl_listener *listener, void *data) {
@@ -33,7 +34,7 @@ static void wl_compositor_create_surface(struct wl_client *client,
static void wl_compositor_create_region(struct wl_client *client,
struct wl_resource *resource, uint32_t id) {
- wlr_log(L_DEBUG, "TODO: implement create_region");
+ wlr_region_create(client, resource, id);
}
struct wl_compositor_interface wl_compositor_impl = {