diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2023-11-02 10:33:22 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2024-03-20 09:05:36 +0100 |
commit | 2bdf594ceaaa9e6788e9090de0f3713184ed2d59 (patch) | |
tree | 53f8ca6bd3bf6abcba221fd627c108c95aec78ab /hw/xwayland | |
parent | 5b05a299126e621f11977c75318975c850b98c93 (diff) |
xwayland: Track output scales
Keep track of the output scales as advertised by the wl_output protocol.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-By: Kenny Levinsen <kl@kl.wtf>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1197>
Diffstat (limited to 'hw/xwayland')
-rw-r--r-- | hw/xwayland/xwayland-output.c | 3 | ||||
-rw-r--r-- | hw/xwayland/xwayland-output.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index 8a4a55312..2c987a39f 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -725,6 +725,9 @@ output_handle_done(void *data, struct wl_output *wl_output) static void output_handle_scale(void *data, struct wl_output *wl_output, int32_t factor) { + struct xwl_output *xwl_output = data; + + xwl_output->scale = factor; } static void diff --git a/hw/xwayland/xwayland-output.h b/hw/xwayland/xwayland-output.h index 5138d5e88..0e5ee6b55 100644 --- a/hw/xwayland/xwayland-output.h +++ b/hw/xwayland/xwayland-output.h @@ -54,7 +54,7 @@ struct xwl_output { struct wl_output *output; struct zxdg_output_v1 *xdg_output; uint32_t server_output_id; - int32_t x, y, width, height, refresh; + int32_t x, y, width, height, refresh, scale; int32_t mode_width, mode_height; double xscale; /* Effective scale, can be fractional */ Rotation rotation; |