aboutsummaryrefslogtreecommitdiff
path: root/wayland.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-06-26 14:53:16 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-06-29 13:38:23 +0000
commit434fd6aa1f4a21ef6572a772ec891eeb2006a82c (patch)
treedf70c3c3860c5c111bbb0916cc8b9aaa1ea45813 /wayland.c
parentwayland: refactor: wrap wl_surface pointers in a wayl_surface struct (diff)
wayland: refactor: wayl_surface_scale(): pass wayl_surface pointer
Instead of passing a raw wl_surface pointer, pass a wayl_surface pointer. This is needed later, when using fractional scaling to scale the surface (since then we need the surface’s viewport object).
Diffstat (limited to 'wayland.c')
-rw-r--r--wayland.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wayland.c b/wayland.c
index 3b6833c5..cd1a4c68 100644
--- a/wayland.c
+++ b/wayland.c
@@ -1865,7 +1865,7 @@ wayl_fractional_scaling(const struct wayland *wayl)
}
void
-wayl_surface_scale(const struct wayland *wayl, struct wl_surface *surf,
+wayl_surface_scale(const struct wayland *wayl, const struct wayl_surface *surf,
float scale)
{
LOG_WARN("scaling by a factor of %.2f (legacy)", scale);
@@ -1873,7 +1873,7 @@ wayl_surface_scale(const struct wayland *wayl, struct wl_surface *surf,
if (wayl_fractional_scaling(wayl)) {
BUG("not yet implemented");
} else {
- wl_surface_set_buffer_scale(surf, (int)scale);
+ wl_surface_set_buffer_scale(surf->surf, (int)scale);
}
}
@@ -1884,7 +1884,7 @@ wayl_win_scale(struct wl_window *win)
const struct wayland *wayl = term->wl;
const float scale = term->scale;
- wayl_surface_scale(wayl, win->surface.surf, scale);
+ wayl_surface_scale(wayl, &win->surface, scale);
}
void