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>
This commit is contained in:
parent
5b05a29912
commit
2bdf594cea
|
@ -725,6 +725,9 @@ output_handle_done(void *data, struct wl_output *wl_output)
|
||||||
static void
|
static void
|
||||||
output_handle_scale(void *data, struct wl_output *wl_output, int32_t factor)
|
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
|
static void
|
||||||
|
|
|
@ -54,7 +54,7 @@ struct xwl_output {
|
||||||
struct wl_output *output;
|
struct wl_output *output;
|
||||||
struct zxdg_output_v1 *xdg_output;
|
struct zxdg_output_v1 *xdg_output;
|
||||||
uint32_t server_output_id;
|
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;
|
int32_t mode_width, mode_height;
|
||||||
double xscale; /* Effective scale, can be fractional */
|
double xscale; /* Effective scale, can be fractional */
|
||||||
Rotation rotation;
|
Rotation rotation;
|
||||||
|
|
Loading…
Reference in New Issue