From 776b6ce39512c00d756b994528b4fb300c0d5610 Mon Sep 17 00:00:00 2001 From: Alexander Bakker Date: Sun, 13 Jan 2019 17:22:18 +0100 Subject: Fix software cursor rendering for tinywl and some examples --- tinywl/tinywl.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tinywl') diff --git a/tinywl/tinywl.c b/tinywl/tinywl.c index 49bce1f3..14a1d08b 100644 --- a/tinywl/tinywl.c +++ b/tinywl/tinywl.c @@ -610,6 +610,14 @@ static void output_frame(struct wl_listener *listener, void *data) { render_surface, &rdata); } + /* Hardware cursors are rendered by the GPU on a separate plane, and can be + * moved around without re-rendering what's beneath them - which is more + * efficient. However, not all hardware supports hardware cursors. For this + * reason, wlroots provides a software fallback, which we ask it to render + * here. wlr_cursor handles configuring hardware vs software cursors for you, + * and this function is a no-op when hardware cursors are in use. */ + wlr_output_render_software_cursors(output->wlr_output, NULL); + /* Conclude rendering and swap the buffers, showing the final frame * on-screen. */ wlr_renderer_end(renderer); -- cgit v1.2.3