aboutsummaryrefslogtreecommitdiff
path: root/examples/compositor/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/compositor/main.c')
-rw-r--r--examples/compositor/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/compositor/main.c b/examples/compositor/main.c
index 6afdb391..8e5fcc34 100644
--- a/examples/compositor/main.c
+++ b/examples/compositor/main.c
@@ -10,6 +10,7 @@
#include <wlr/render.h>
#include <wlr/render/gles2.h>
#include <wlr/types/wlr_output.h>
+#include <wlr/types/wlr_surface.h>
#include <xkbcommon/xkbcommon.h>
#include <wlr/util/log.h>
#include "shared.h"
@@ -32,11 +33,11 @@ void handle_output_frame(struct output_state *output, struct timespec *ts) {
struct wl_resource *_res;
float matrix[16];
wl_list_for_each(_res, &sample->compositor.surfaces, link) {
- struct wlr_texture *texture = wl_resource_get_user_data(_res);
- if (texture->valid) {
- wlr_texture_get_matrix(texture, &matrix,
+ struct wlr_surface *surface = wl_resource_get_user_data(_res);
+ if (surface->texture->valid) {
+ wlr_texture_get_matrix(surface->texture, &matrix,
&wlr_output->transform_matrix, 200, 200);
- wlr_render_with_matrix(sample->renderer, texture, &matrix);
+ wlr_render_with_matrix(sample->renderer, surface->texture, &matrix);
}
}