kitty/glfw/wl_cursors.h
Kovid Goyal 6f40b8d0a1
Simplify Wayland cursor theme handling
Now themes are loaded once per scale and stored centrally not per
window. They are not unloaded till application shutdown. Since there
is unlikely to be more than two or three scales this is not a big waste
of resources. Since cursor lifetime is tied to theme lifetime and cursors
are stored per window, destroying a theme requires destroying all
cursors win all windows referring to that theme, which is too much work.

Should hopefully fix #2810
2020-07-25 15:36:46 +05:30

19 lines
366 B
C
Vendored

// Declarations for a HiDPI-aware cursor theme manager.
#include <wayland-cursor.h>
typedef struct {
struct wl_cursor_theme *theme;
int scale;
} GLFWWLCursorTheme;
typedef struct {
GLFWWLCursorTheme *themes;
size_t count, capacity;
} GLFWWLCursorThemes;
struct wl_cursor_theme* glfw_wlc_theme_for_scale(int scale);
void glfw_wlc_destroy(void);