mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-11 14:45:31 +03:00
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
19 lines
366 B
C
Vendored
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);
|