mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-22 18:09:49 +01:00
examples, tinywl: use "default" cursor instead of "left_ptr"
"left_ptr" is the X11 name, "default" is the cursor spec name.
This commit is contained in:
parent
4097eb20f3
commit
3668c9d86c
5 changed files with 9 additions and 9 deletions
|
@ -615,14 +615,14 @@ int main(int argc, char **argv) {
|
|||
struct wl_cursor *cursor =
|
||||
wl_cursor_theme_get_cursor(cursor_theme, "crosshair");
|
||||
if (cursor == NULL) {
|
||||
cursor = wl_cursor_theme_get_cursor(cursor_theme, "left_ptr");
|
||||
cursor = wl_cursor_theme_get_cursor(cursor_theme, "default");
|
||||
}
|
||||
assert(cursor);
|
||||
cursor_image = cursor->images[0];
|
||||
|
||||
cursor = wl_cursor_theme_get_cursor(cursor_theme, "tcross");
|
||||
if (cursor == NULL) {
|
||||
cursor = wl_cursor_theme_get_cursor(cursor_theme, "left_ptr");
|
||||
cursor = wl_cursor_theme_get_cursor(cursor_theme, "default");
|
||||
}
|
||||
assert(cursor);
|
||||
popup_cursor_image = cursor->images[0];
|
||||
|
|
|
@ -298,9 +298,9 @@ int main(int argc, char *argv[]) {
|
|||
wlr_log(WLR_ERROR, "Failed to load cursor theme");
|
||||
return 1;
|
||||
}
|
||||
state.xcursor = wlr_xcursor_theme_get_cursor(theme, "left_ptr");
|
||||
state.xcursor = wlr_xcursor_theme_get_cursor(theme, "default");
|
||||
if (!state.xcursor) {
|
||||
wlr_log(WLR_ERROR, "Failed to load left_ptr cursor");
|
||||
wlr_log(WLR_ERROR, "Failed to load default cursor");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ static void new_output_notify(struct wl_listener *listener, void *data) {
|
|||
wlr_output_layout_add_auto(sample->layout, sample_output->output);
|
||||
|
||||
wlr_xcursor_manager_load(sample->xcursor_manager, output->scale);
|
||||
wlr_xcursor_manager_set_cursor_image(sample->xcursor_manager, "left_ptr",
|
||||
wlr_xcursor_manager_set_cursor_image(sample->xcursor_manager, "default",
|
||||
sample->cursor);
|
||||
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(output);
|
||||
|
@ -388,11 +388,11 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
state.xcursor_manager = wlr_xcursor_manager_create("default", 24);
|
||||
if (!state.xcursor_manager) {
|
||||
wlr_log(WLR_ERROR, "Failed to load left_ptr cursor");
|
||||
wlr_log(WLR_ERROR, "Failed to load default cursor");
|
||||
return 1;
|
||||
}
|
||||
|
||||
wlr_xcursor_manager_set_cursor_image(state.xcursor_manager, "left_ptr",
|
||||
wlr_xcursor_manager_set_cursor_image(state.xcursor_manager, "default",
|
||||
state.cursor);
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &state.last_frame);
|
||||
|
|
|
@ -105,7 +105,7 @@ struct wlr_xcursor_theme *wlr_xcursor_theme_load(const char *name, int size);
|
|||
void wlr_xcursor_theme_destroy(struct wlr_xcursor_theme *theme);
|
||||
|
||||
/**
|
||||
* Obtain a cursor for the specified name (e.g. "left_ptr").
|
||||
* Obtain a cursor for the specified name (e.g. "default").
|
||||
*
|
||||
* If the cursor could not be found, NULL is returned.
|
||||
*/
|
||||
|
|
|
@ -450,7 +450,7 @@ static void process_cursor_motion(struct tinywl_server *server, uint32_t time) {
|
|||
* default. This is what makes the cursor image appear when you move it
|
||||
* around the screen, not over any views. */
|
||||
wlr_xcursor_manager_set_cursor_image(
|
||||
server->cursor_mgr, "left_ptr", server->cursor);
|
||||
server->cursor_mgr, "default", server->cursor);
|
||||
}
|
||||
if (surface) {
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue