aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-06-22 12:23:53 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-06-29 13:38:22 +0000
commit6e2a47287aa5160134a8bb75f562af5c85f3aaf2 (patch)
treeadf493af7296ec97b1cac5d79dec35240af2cd9a
parentterm: convert ‘scale’ to a float (diff)
wayland: pointer.scale: convert to float
-rw-r--r--wayland.c4
-rw-r--r--wayland.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/wayland.c b/wayland.c
index 7aa48e71..b5bca9ba 100644
--- a/wayland.c
+++ b/wayland.c
@@ -1733,7 +1733,7 @@ wayl_win_destroy(struct wl_window *win)
}
bool
-wayl_reload_xcursor_theme(struct seat *seat, int new_scale)
+wayl_reload_xcursor_theme(struct seat *seat, float new_scale)
{
if (seat->pointer.theme != NULL && seat->pointer.scale == new_scale) {
/* We already have a theme loaded, and the scale hasn't changed */
@@ -1766,7 +1766,7 @@ wayl_reload_xcursor_theme(struct seat *seat, int new_scale)
const char *xcursor_theme = getenv("XCURSOR_THEME");
- LOG_INFO("cursor theme: %s, size: %d, scale: %d",
+ LOG_INFO("cursor theme: %s, size: %d, scale: %.2f",
xcursor_theme ? xcursor_theme : "(null)",
xcursor_size, new_scale);
diff --git a/wayland.h b/wayland.h
index 20edcb68..a5316837 100644
--- a/wayland.h
+++ b/wayland.h
@@ -135,7 +135,7 @@ struct seat {
struct wl_surface *surface;
struct wl_cursor_theme *theme;
struct wl_cursor *cursor;
- int scale;
+ float scale;
bool hidden;
const char *xcursor;
@@ -442,7 +442,7 @@ struct wayland *wayl_init(
bool presentation_timings);
void wayl_destroy(struct wayland *wayl);
-bool wayl_reload_xcursor_theme(struct seat *seat, int new_scale);
+bool wayl_reload_xcursor_theme(struct seat *seat, float new_scale);
void wayl_flush(struct wayland *wayl);
void wayl_roundtrip(struct wayland *wayl);