xwayland: Add scale factor to the Xwayland screen

For now, the global surface scale is always 1, no functional change.

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:
Olivier Fourdan 2023-11-02 10:23:54 +01:00
parent 2bdf594cea
commit b678297c53
2 changed files with 2 additions and 0 deletions

View File

@ -915,6 +915,7 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
xorg_list_init(&xwl_screen->drm_leases); xorg_list_init(&xwl_screen->drm_leases);
xorg_list_init(&xwl_screen->pending_wl_surface_destroy); xorg_list_init(&xwl_screen->pending_wl_surface_destroy);
xwl_screen->depth = 24; xwl_screen->depth = 24;
xwl_screen->global_surface_scale = 1;
if (!monitorResolution) if (!monitorResolution)
monitorResolution = DEFAULT_DPI; monitorResolution = DEFAULT_DPI;

View File

@ -48,6 +48,7 @@ struct xwl_screen {
double width; double width;
double height; double height;
int depth; int depth;
int global_surface_scale;
int output_name_serial; int output_name_serial;
ScreenPtr screen; ScreenPtr screen;
int wm_client_id; int wm_client_id;