aboutsummaryrefslogtreecommitdiff
path: root/examples/tablet.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-02-09 09:38:48 -0500
committerGitHub <noreply@github.com>2018-02-09 09:38:48 -0500
commit34489dca16ef9e7fd05c161b8b4f2fd5ce5e4ef0 (patch)
tree2a90beb98aacd85bbc5bd30df998b4e7c92ec3e7 /examples/tablet.c
parent09c2626e32fd0eadc4b95a4f36b34f6bde79f6f4 (diff)
parentcdd55b5d19470981ad71f8e6d31bd8152e44364b (diff)
Merge pull request #571 from emersion/output-damage
Output damage tracking
Diffstat (limited to 'examples/tablet.c')
-rw-r--r--examples/tablet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/tablet.c b/examples/tablet.c
index f3cd5339..ca76ec5a 100644
--- a/examples/tablet.c
+++ b/examples/tablet.c
@@ -42,8 +42,9 @@ static void handle_output_frame(struct output_state *output, struct timespec *ts
int32_t width, height;
wlr_output_effective_resolution(wlr_output, &width, &height);
- wlr_output_make_current(wlr_output);
+ wlr_output_make_current(wlr_output, NULL);
wlr_renderer_begin(sample->renderer, wlr_output);
+ wlr_renderer_clear(sample->renderer, &(float[]){0.25f, 0.25f, 0.25f, 1});
float matrix[16], view[16];
float distance = 0.8f * (1 - sample->distance);
@@ -76,7 +77,7 @@ static void handle_output_frame(struct output_state *output, struct timespec *ts
}
wlr_renderer_end(sample->renderer);
- wlr_output_swap_buffers(wlr_output);
+ wlr_output_swap_buffers(wlr_output, NULL, NULL);
}
static void handle_tool_axis(struct tablet_tool_state *tstate,