diff options
author | Antonin Décimo | 2020-09-03 15:07:05 +0200 |
---|---|---|
committer | Antonin Décimo | 2020-09-03 15:07:05 +0200 |
commit | a3f83dfcabb30fff36d2b3758b3f033377cc3830 (patch) | |
tree | 09be22ce415ff0eadd859ee50eaf6390d8696ac4 | |
parent | b1401cdc6d26ae879aa147b72114daf0be044bd0 (diff) | |
download | aur-a3f83dfcabb30fff36d2b3758b3f033377cc3830.tar.gz |
Add 'Fix cursor size, present scale, and present damage' patch.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | xwlScaling.diff | 34 |
3 files changed, 30 insertions, 12 deletions
@@ -1,6 +1,6 @@ pkgbase = xorg-server-hidpi-git pkgver = 1.20.0.r719.g727df0a74 - pkgrel = 1 + pkgrel = 2 url = https://gitlab.freedesktop.org/xorg/xserver.git arch = x86_64 groups = xorg @@ -45,7 +45,7 @@ pkgbase = xorg-server-hidpi-git sha256sums = SKIP sha256sums = ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9 sha256sums = 2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776 - sha256sums = 70b81cd399fe2d9915f4358667d6655a63d6b174e914b98e9bf5e8b188f607a6 + sha256sums = acf385d0ef8533adabaf32d68914643e4d5a617e5d66eeed67395581ad64517a pkgname = xorg-server-hidpi-git pkgdesc = Xorg X server (git version) @@ -14,7 +14,7 @@ pkgname=( 'xorg-server-devel-hidpi-git') _pkgbase='xserver' pkgver=1.20.0.r719.g727df0a74 -pkgrel=1 +pkgrel=2 arch=('x86_64') license=('custom') groups=('xorg') @@ -32,7 +32,7 @@ source=(git+https://gitlab.freedesktop.org/xorg/xserver.git sha256sums=('SKIP' 'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9' '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776' - '70b81cd399fe2d9915f4358667d6655a63d6b174e914b98e9bf5e8b188f607a6') + 'acf385d0ef8533adabaf32d68914643e4d5a617e5d66eeed67395581ad64517a') options=(debug !strip) pkgver() { diff --git a/xwlScaling.diff b/xwlScaling.diff index 020ffec1d6c3..41d3f42924c8 100644 --- a/xwlScaling.diff +++ b/xwlScaling.diff @@ -25,7 +25,7 @@ index c41080f20..3ef741c3e 100644 'xwayland-glx.h', 'xwayland-pixmap.c', diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c -index 91728f1c1..47abac644 100644 +index 91728f1c1..f7090c5cf 100644 --- a/hw/xwayland/xwayland-cursor.c +++ b/hw/xwayland/xwayland-cursor.c @@ -138,6 +138,7 @@ static const struct wl_callback_listener frame_listener = { @@ -36,7 +36,7 @@ index 91728f1c1..47abac644 100644 struct xwl_cursor *xwl_cursor = &xwl_seat->cursor; PixmapPtr pixmap; CursorPtr cursor; -@@ -174,8 +175,8 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat) +@@ -174,10 +175,11 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat) wl_pointer_set_cursor(xwl_seat->wl_pointer, xwl_seat->pointer_enter_serial, xwl_cursor->surface, @@ -46,8 +46,11 @@ index 91728f1c1..47abac644 100644 + xwl_scale_to(xwl_screen, xwl_seat->x_cursor->bits->yhot)); wl_surface_attach(xwl_cursor->surface, xwl_shm_pixmap_get_wl_buffer(pixmap), 0, 0); ++ wl_surface_set_buffer_scale(xwl_cursor->surface, xwl_screen->global_output_scale); xwl_surface_damage(xwl_seat->xwl_screen, xwl_cursor->surface, 0, 0, -@@ -192,6 +193,7 @@ void + xwl_seat->x_cursor->bits->width, + xwl_seat->x_cursor->bits->height); +@@ -192,6 +194,7 @@ void xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *xwl_tablet_tool) { struct xwl_seat *xwl_seat = xwl_tablet_tool->seat; @@ -55,7 +58,7 @@ index 91728f1c1..47abac644 100644 struct xwl_cursor *xwl_cursor = &xwl_tablet_tool->cursor; PixmapPtr pixmap; CursorPtr cursor; -@@ -226,8 +228,8 @@ xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *xwl_tablet_tool) +@@ -226,10 +229,11 @@ xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *xwl_tablet_tool) zwp_tablet_tool_v2_set_cursor(xwl_tablet_tool->tool, xwl_tablet_tool->proximity_in_serial, xwl_cursor->surface, @@ -65,7 +68,10 @@ index 91728f1c1..47abac644 100644 + xwl_scale_to(xwl_screen, xwl_seat->x_cursor->bits->yhot)); wl_surface_attach(xwl_cursor->surface, xwl_shm_pixmap_get_wl_buffer(pixmap), 0, 0); ++ wl_surface_set_buffer_scale(xwl_cursor->surface, xwl_screen->global_output_scale); xwl_surface_damage(xwl_seat->xwl_screen, xwl_cursor->surface, 0, 0, + xwl_seat->x_cursor->bits->width, + xwl_seat->x_cursor->bits->height); diff --git a/hw/xwayland/xwayland-ext.c b/hw/xwayland/xwayland-ext.c new file mode 100644 index 000000000..1668dda57 @@ -502,6 +508,18 @@ index 02b983108..ec089757f 100644 void xwl_screen_init_xdg_output(struct xwl_screen *xwl_screen); #endif /* XWAYLAND_OUTPUT_H */ +diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c +index a4ecdada4..d63a14786 100644 +--- a/hw/xwayland/xwayland-present.c ++++ b/hw/xwayland/xwayland-present.c +@@ -459,6 +459,7 @@ xwl_present_flip(WindowPtr present_window, + + /* We can flip directly to the main surface (full screen window without clips) */ + wl_surface_attach(xwl_window->surface, buffer, 0, 0); ++ wl_surface_set_buffer_scale(xwl_window->surface, xwl_window->xwl_screen->global_output_scale); + + if (!xwl_window->frame_callback) + xwl_window_create_frame_callback(xwl_window); diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index 92643c0ed..2115b3ba2 100644 --- a/hw/xwayland/xwayland-screen.c @@ -584,7 +602,7 @@ index 8d0b12705..85e0a4fd7 100644 #endif /* XWAYLAND_SCREEN_H */ diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c -index 23d2b3086..f9a7712f4 100644 +index 23d2b3086..9dbf9d0a5 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -470,7 +470,8 @@ ensure_surface_for_window(WindowPtr window) @@ -597,14 +615,14 @@ index 23d2b3086..f9a7712f4 100644 wl_surface_set_opaque_region(xwl_window->surface, region); wl_region_destroy(region); } -@@ -811,6 +812,7 @@ xwl_window_post_damage(struct xwl_window *xwl_window) - xwl_glamor_post_damage(xwl_window, pixmap, region); +@@ -812,6 +813,7 @@ xwl_window_post_damage(struct xwl_window *xwl_window) #endif -+ wl_surface_set_buffer_scale(xwl_window->surface, xwl_screen->global_output_scale); wl_surface_attach(xwl_window->surface, buffer, 0, 0); ++ wl_surface_set_buffer_scale(xwl_window->surface, xwl_screen->global_output_scale); /* Arbitrary limit to try to avoid flooding the Wayland + * connection. If we flood it too much anyway, this could diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index 380c9c849..c595c4df4 100644 --- a/hw/xwayland/xwayland.c |