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

@ -409,6 +409,8 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
wlr_xwayland->wl_fd[0] = wlr_xwayland->wl_fd[1] = -1;
wlr_xwayland->wm_fd[0] = wlr_xwayland->wm_fd[1] = -1;
wlr_xwayland->scale = 1;
wl_signal_init(&wlr_xwayland->events.new_surface);
wl_signal_init(&wlr_xwayland->events.ready);
@ -436,6 +438,10 @@ error_alloc:
return NULL;
}
void wlr_xwayland_set_scale(struct wlr_xwayland *wlr_xwayland, int32_t scale) {
wlr_xwayland->scale = 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) {