mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01:00
xcursor-manager: drop wlr_xcursor_manager_set_cursor_image()
This commit is contained in:
parent
71c87ff4b8
commit
18bafbfc57
2 changed files with 0 additions and 29 deletions
|
@ -10,7 +10,6 @@
|
|||
#define WLR_TYPES_WLR_XCURSOR_MANAGER_H
|
||||
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_cursor.h>
|
||||
#include <wlr/xcursor.h>
|
||||
|
||||
/**
|
||||
|
@ -57,15 +56,4 @@ bool wlr_xcursor_manager_load(struct wlr_xcursor_manager *manager,
|
|||
struct wlr_xcursor *wlr_xcursor_manager_get_xcursor(
|
||||
struct wlr_xcursor_manager *manager, const char *name, float scale);
|
||||
|
||||
/**
|
||||
* Set a struct wlr_cursor's cursor image to the specified cursor name for all
|
||||
* scale factors. struct wlr_cursor will take over from this point and ensure
|
||||
* the correct cursor is used on each output, assuming a
|
||||
* struct wlr_output_layout is attached to it.
|
||||
*
|
||||
* Deprecated: wlr_cursor_set_xcursor() should be used instead.
|
||||
*/
|
||||
void wlr_xcursor_manager_set_cursor_image(struct wlr_xcursor_manager *manager,
|
||||
const char *name, struct wlr_cursor *cursor);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -65,20 +65,3 @@ struct wlr_xcursor *wlr_xcursor_manager_get_xcursor(
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void wlr_xcursor_manager_set_cursor_image(struct wlr_xcursor_manager *manager,
|
||||
const char *name, struct wlr_cursor *cursor) {
|
||||
struct wlr_xcursor_manager_theme *theme;
|
||||
wl_list_for_each(theme, &manager->scaled_themes, link) {
|
||||
struct wlr_xcursor *xcursor =
|
||||
wlr_xcursor_theme_get_cursor(theme->theme, name);
|
||||
if (xcursor == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
struct wlr_xcursor_image *image = xcursor->images[0];
|
||||
wlr_cursor_set_image(cursor, image->buffer, image->width * 4,
|
||||
image->width, image->height, image->hotspot_x, image->hotspot_y,
|
||||
theme->scale);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue