xwayland: add support for global scale factor

This does the necessary changes to support HiDPI in xwayland
applications, with the following xwayland patch:
https://gitlab.freedesktop.org/xorg/xserver/merge_requests/111
This commit is contained in:
Dario Nieuwenhuis 2020-01-31 22:57:48 +01:00
parent 61d6408fdb
commit 9bd9089045
3 changed files with 41 additions and 11 deletions

View file

@ -30,6 +30,8 @@ struct wlr_xwayland {
time_t server_start;
int32_t scale;
/* Anything above display is reset on Xwayland restart, rest is conserved */
int display;
@ -205,6 +207,8 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
void wlr_xwayland_destroy(struct wlr_xwayland *wlr_xwayland);
void wlr_xwayland_set_scale(struct wlr_xwayland *wlr_xwayland, int32_t scale);
void wlr_xwayland_set_cursor(struct wlr_xwayland *wlr_xwayland,
uint8_t *pixels, uint32_t stride, uint32_t width, uint32_t height,
int32_t hotspot_x, int32_t hotspot_y);