diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-18 19:58:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-18 19:58:41 -0400 |
commit | 3674085faede2960581461cf8f40c33ffce85e7c (patch) | |
tree | 8c1dbe3574a00c4ee977507d5f11cd71d7419c7c /examples | |
parent | 01d9eda702b3c3fc56b00ab63568ae2d43218515 (diff) | |
parent | f334dcaf40799b82c102c8583f9f91c377321ee4 (diff) |
Merge pull request #113 from acrisci/feature/rename-wlr-cursor
rename wlr_cursor to wlr_xcursor
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pointer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/pointer.c b/examples/pointer.c index ef815785..1325a579 100644 --- a/examples/pointer.c +++ b/examples/pointer.c @@ -22,7 +22,7 @@ #include "cat.h" struct sample_state { - struct wlr_cursor *cursor; + struct wlr_xcursor *cursor; double cur_x, cur_y; float default_color[4]; float clear_color[4]; @@ -48,7 +48,7 @@ static void handle_pointer_motion(struct pointer_state *pstate, state->cur_x += d_x; state->cur_y += d_y; - struct wlr_cursor_image *image = state->cursor->images[0]; + struct wlr_xcursor_image *image = state->cursor->images[0]; struct output_state *output; wl_list_for_each(output, &pstate->compositor->outputs, link) { @@ -64,7 +64,7 @@ static void handle_pointer_motion_absolute(struct pointer_state *pstate, state->cur_x = x; state->cur_y = y; - struct wlr_cursor_image *image = state->cursor->images[0]; + struct wlr_xcursor_image *image = state->cursor->images[0]; struct output_state *output; wl_list_for_each(output, &pstate->compositor->outputs, link) { @@ -109,7 +109,7 @@ static void handle_pointer_axis(struct pointer_state *pstate, static void handle_output_add(struct output_state *ostate) { struct sample_state *state = ostate->compositor->data; struct wlr_output *wlr_output = ostate->output; - struct wlr_cursor_image *image = state->cursor->images[0]; + struct wlr_xcursor_image *image = state->cursor->images[0]; if (!wlr_output_set_cursor(wlr_output, image->buffer, image->width, image->width, image->height)) { wlr_log(L_DEBUG, "Failed to set hardware cursor"); @@ -134,12 +134,12 @@ int main(int argc, char *argv[]) { compositor.pointer_button_cb = handle_pointer_button; compositor.pointer_axis_cb = handle_pointer_axis; - struct wlr_cursor_theme *theme = wlr_cursor_theme_load("default", 16); + struct wlr_xcursor_theme *theme = wlr_xcursor_theme_load("default", 16); if (!theme) { wlr_log(L_ERROR, "Failed to load cursor theme"); return 1; } - state.cursor = wlr_cursor_theme_get_cursor(theme, "left_ptr"); + state.cursor = wlr_xcursor_theme_get_cursor(theme, "left_ptr"); if (!state.cursor) { wlr_log(L_ERROR, "Failed to load left_ptr cursor"); return 1; @@ -148,5 +148,5 @@ int main(int argc, char *argv[]) { compositor_init(&compositor); compositor_run(&compositor); - wlr_cursor_theme_destroy(theme); + wlr_xcursor_theme_destroy(theme); } |