aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-06-19 14:02:25 -0400
committerDrew DeVault <sir@cmpwn.com>2017-06-19 14:02:25 -0400
commite9609e9adf2883a1cf2b766adf5363f25f8f0833 (patch)
tree48405f9482088261426a6a4147c7e2669b161d2a
parent7e038a6110501a51e7f3d3366e8bc54a02766f22 (diff)
Allocate framebuffers for hardware cursors
Still doesn't fix cursors though
-rw-r--r--backend/drm/drm.c4
-rw-r--r--example/pointer.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 00b45bce..befbfb94 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -296,6 +296,10 @@ static void wlr_drm_cursor_bo_update(struct wlr_output_state *output,
wlr_log(L_ERROR, "Failed to create cursor bo");
return;
}
+ if (!get_fb_for_bo(state->fd, output->cursor_bo[i])) {
+ wlr_log(L_ERROR, "Failed to create cursor fb");
+ return;
+ }
}
}
diff --git a/example/pointer.c b/example/pointer.c
index d97d253e..ddb665a1 100644
--- a/example/pointer.c
+++ b/example/pointer.c
@@ -94,8 +94,9 @@ static void handle_pointer_axis(struct pointer_state *pstate,
static void handle_output_add(struct output_state *ostate) {
struct wlr_output *wlr_output = ostate->output;
+ int width = 16, height = 16;
if (!wlr_output_set_cursor(wlr_output, cat_tex.pixel_data,
- cat_tex.width * 4, cat_tex.width, cat_tex.height)) {
+ width * 4, width, height)) {
fprintf(stderr, "Failed to set cursor\n");
return;
}