summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorq234rty2023-08-12 17:14:55 +0800
committerq234rty2023-08-12 17:16:19 +0800
commit180a2c0275ab18a821418ebac0cf3c1ac1cd6544 (patch)
tree56a7ef98f7d3ecbb58b528f96c81f141d4f3586b
parent8f14904f40f22b5ad247f022de21875c5a4d1050 (diff)
downloadaur-180a2c0275ab18a821418ebac0cf3c1ac1cd6544.tar.gz
Add a patch to fix size hints
-rw-r--r--.SRCINFO10
-rw-r--r--0001-xwayland-support-HiDPI-scale.patch20
-rw-r--r--0002-Fix-configure_notify-event.patch10
-rw-r--r--0003-Fix-size-hints-under-Xwayland-scaling.patch54
-rw-r--r--PKGBUILD13
5 files changed, 83 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7ab0c67bce5b..abdc5d29f396 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = wlroots-hidpi-xprop-git
pkgdesc = Modular Wayland compositor library (git version, with patches)
- pkgver = 0.17.0.20230309.185147
- pkgrel = 1
+ pkgver = 0.17.0.20230803.144028
+ pkgrel = 2
url = https://gitlab.freedesktop.org/wlroots/wlroots
install = wlroots-hidpi-xprop-git.install
arch = x86_64
@@ -37,8 +37,10 @@ pkgbase = wlroots-hidpi-xprop-git
source = wlroots-hidpi-xprop-git::git+https://gitlab.freedesktop.org/wlroots/wlroots.git
source = 0001-xwayland-support-HiDPI-scale.patch
source = 0002-Fix-configure_notify-event.patch
+ source = 0003-Fix-size-hints-under-Xwayland-scaling.patch
sha512sums = SKIP
- sha512sums = 0595261b7beaa382f351b74d207956a7d36e05db4e96093d68773975cd2a6d6022a03e2aee927b1286bfd382d7c9d5ec22c747b501c2b0cd9e33f1e031a00022
- sha512sums = 00c0c841f6c78d941d5128f9e0337dfd36245b74f82b53a73cc453b8cd4b09d3788f5d2d397db5cacd7445f17ff07dd8875954b5d570fcb6468e3b15060cb69a
+ sha512sums = e94c5aafa13d7b78a9e0245a78c6b937f64ac78472f22afc2ca712c330212d6f69579139b103b0fc1515e901725a91ed8132d5be58be300fd45ca57c8ca80761
+ sha512sums = c89c9aaa26457e64dff3530c9042afbbfd45a41dcffb01020c512eaaa359811bc16e929003ef56eb6b77f380ac0381b8382cc09da6e78ca0e6d0b2642b2a68bf
+ sha512sums = d54d1faf46a390492ae2bc44238185aead9231b41dbf76567dd0dc4b85579edd5bef29a5ee22062993d06bbf24954216ebfe9a3da4ee67cd5c8b5121925e3483
pkgname = wlroots-hidpi-xprop-git
diff --git a/0001-xwayland-support-HiDPI-scale.patch b/0001-xwayland-support-HiDPI-scale.patch
index 645986314065..43d76b413793 100644
--- a/0001-xwayland-support-HiDPI-scale.patch
+++ b/0001-xwayland-support-HiDPI-scale.patch
@@ -1,7 +1,7 @@
-From 5d04dc68d7a952c2b98cab7af60bba93bee2dec7 Mon Sep 17 00:00:00 2001
+From 179258208d98fe3755b414749e9776e96d3b1dad Mon Sep 17 00:00:00 2001
From: lilydjwg <lilydjwg@gmail.com>
Date: Wed, 17 Nov 2021 19:34:58 +0800
-Subject: [PATCH 1/2] xwayland: support HiDPI scale
+Subject: [PATCH 1/3] xwayland: support HiDPI scale
This supports the xorg-xwayland patch at https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/733
---
@@ -30,7 +30,7 @@ index 3d540522..33ff1478 100644
xcb_atom_t atoms[ATOM_LAST];
xcb_connection_t *xcb_conn;
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
-index 5f857f24..4f03b07c 100644
+index 0c30d8f6..59e9ce06 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -19,6 +19,14 @@
@@ -56,7 +56,7 @@ index 5f857f24..4f03b07c 100644
};
#define STARTUP_INFO_REMOVE_PREFIX "remove: ID="
-@@ -965,8 +974,8 @@ static void xwm_handle_create_notify(struct wlr_xwm *xwm,
+@@ -962,8 +971,8 @@ static void xwm_handle_create_notify(struct wlr_xwm *xwm,
return;
}
@@ -67,7 +67,7 @@ index 5f857f24..4f03b07c 100644
}
static void xwm_handle_destroy_notify(struct wlr_xwm *xwm,
-@@ -997,10 +1006,10 @@ static void xwm_handle_configure_request(struct wlr_xwm *xwm,
+@@ -994,10 +1003,10 @@ static void xwm_handle_configure_request(struct wlr_xwm *xwm,
struct wlr_xwayland_surface_configure_event wlr_event = {
.surface = surface,
@@ -82,7 +82,7 @@ index 5f857f24..4f03b07c 100644
.mask = mask,
};
-@@ -1015,14 +1024,14 @@ static void xwm_handle_configure_notify(struct wlr_xwm *xwm,
+@@ -1012,14 +1021,14 @@ static void xwm_handle_configure_notify(struct wlr_xwm *xwm,
}
bool geometry_changed =
@@ -103,7 +103,7 @@ index 5f857f24..4f03b07c 100644
}
if (xsurface->override_redirect != ev->override_redirect) {
-@@ -1132,7 +1141,22 @@ static void xwm_handle_unmap_notify(struct wlr_xwm *xwm,
+@@ -1136,7 +1145,22 @@ static void xwm_handle_unmap_notify(struct wlr_xwm *xwm,
static void xwm_handle_property_notify(struct wlr_xwm *xwm,
xcb_property_notify_event_t *ev) {
struct wlr_xwayland_surface *xsurface = lookup_surface(xwm, ev->window);
@@ -126,7 +126,7 @@ index 5f857f24..4f03b07c 100644
return;
}
-@@ -1769,7 +1793,7 @@ void wlr_xwayland_surface_configure(struct wlr_xwayland_surface *xsurface,
+@@ -1770,7 +1794,7 @@ void wlr_xwayland_surface_configure(struct wlr_xwayland_surface *xsurface,
uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y |
XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT |
XCB_CONFIG_WINDOW_BORDER_WIDTH;
@@ -135,7 +135,7 @@ index 5f857f24..4f03b07c 100644
xcb_configure_window(xwm->xcb_conn, xsurface->window_id, mask, values);
// If the window size did not change, then we cannot rely on
-@@ -2122,6 +2146,7 @@ struct wlr_xwm *xwm_create(struct wlr_xwayland *xwayland, int wm_fd) {
+@@ -2123,6 +2147,7 @@ struct wlr_xwm *xwm_create(struct wlr_xwayland *xwayland, int wm_fd) {
wl_list_init(&xwm->pending_startup_ids);
xwm->ping_timeout = 10000;
@@ -144,5 +144,5 @@ index 5f857f24..4f03b07c 100644
int rc = xcb_connection_has_error(xwm->xcb_conn);
--
-2.39.2
+2.41.0
diff --git a/0002-Fix-configure_notify-event.patch b/0002-Fix-configure_notify-event.patch
index 4ffc0bfacb09..6fdf60ff1704 100644
--- a/0002-Fix-configure_notify-event.patch
+++ b/0002-Fix-configure_notify-event.patch
@@ -1,17 +1,17 @@
-From 2fbf42a76ebf3959fb95a6c0ea66a6f04b032070 Mon Sep 17 00:00:00 2001
+From c9315b2f8c84d5f1b0b14f863af6f73bc3ac95c5 Mon Sep 17 00:00:00 2001
From: q234rty <q23456yuiop@gmail.com>
Date: Tue, 21 Feb 2023 23:56:26 +0800
-Subject: [PATCH 2/2] Fix configure_notify event
+Subject: [PATCH 2/3] Fix configure_notify event
---
xwayland/xwm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
-index 4f03b07c..f5ceedb1 100644
+index 59e9ce06..295f4d49 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
-@@ -1806,10 +1806,10 @@ void wlr_xwayland_surface_configure(struct wlr_xwayland_surface *xsurface,
+@@ -1807,10 +1807,10 @@ void wlr_xwayland_surface_configure(struct wlr_xwayland_surface *xsurface,
.response_type = XCB_CONFIGURE_NOTIFY,
.event = xsurface->window_id,
.window = xsurface->window_id,
@@ -27,5 +27,5 @@ index 4f03b07c..f5ceedb1 100644
xcb_send_event(xwm->xcb_conn, 0, xsurface->window_id,
--
-2.39.2
+2.41.0
diff --git a/0003-Fix-size-hints-under-Xwayland-scaling.patch b/0003-Fix-size-hints-under-Xwayland-scaling.patch
new file mode 100644
index 000000000000..a63a619f1a6e
--- /dev/null
+++ b/0003-Fix-size-hints-under-Xwayland-scaling.patch
@@ -0,0 +1,54 @@
+From 7220722f9173a90479d81f4b359cf91956f59f28 Mon Sep 17 00:00:00 2001
+From: Patrick Taibel <git@pmt97.com>
+Date: Sat, 12 Aug 2023 16:05:28 +0800
+Subject: [PATCH 3/3] Fix size hints under Xwayland scaling
+
+---
+ xwayland/xwm.c | 23 ++++++++++++++++++++---
+ 1 file changed, 20 insertions(+), 3 deletions(-)
+
+diff --git a/xwayland/xwm.c b/xwayland/xwm.c
+index 295f4d49..674a32e1 100644
+--- a/xwayland/xwm.c
++++ b/xwayland/xwm.c
+@@ -729,17 +729,34 @@ static void read_surface_normal_hints(struct wlr_xwm *xwm,
+ xsurface->size_hints->base_width = -1;
+ xsurface->size_hints->base_height = -1;
+ } else if (!has_base_size_hints) {
+- xsurface->size_hints->base_width = xsurface->size_hints->min_width;
+- xsurface->size_hints->base_height = xsurface->size_hints->min_height;
+- } else if (!has_min_size_hints) {
++ xsurface->size_hints->base_width = unscale(xwm, xsurface->size_hints->min_width);
++ xsurface->size_hints->base_height = unscale(xwm, xsurface->size_hints->min_height);
+ xsurface->size_hints->min_width = xsurface->size_hints->base_width;
+ xsurface->size_hints->min_height = xsurface->size_hints->base_height;
++ } else if (!has_min_size_hints) {
++ xsurface->size_hints->min_width = unscale(xwm, xsurface->size_hints->base_width);
++ xsurface->size_hints->min_height = unscale(xwm, xsurface->size_hints->base_height);
++ xsurface->size_hints->base_width = xsurface->size_hints->min_width;
++ xsurface->size_hints->base_height = xsurface->size_hints->min_height;
++ } else {
++ xsurface->size_hints->min_width = unscale(xwm, xsurface->size_hints->min_width);
++ xsurface->size_hints->min_height = unscale(xwm, xsurface->size_hints->min_height);
++ xsurface->size_hints->base_width = unscale(xwm, xsurface->size_hints->base_width);
++ xsurface->size_hints->base_height = unscale(xwm, xsurface->size_hints->base_height);
+ }
+
+ if ((flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE) == 0) {
+ xsurface->size_hints->max_width = -1;
+ xsurface->size_hints->max_height = -1;
++ } else {
++ xsurface->size_hints->max_width = unscale(xwm, xsurface->size_hints->max_width);
++ xsurface->size_hints->max_height = unscale(xwm, xsurface->size_hints->max_height);
+ }
++
++ xsurface->size_hints->x = unscale(xwm, xsurface->size_hints->x);
++ xsurface->size_hints->y = unscale(xwm, xsurface->size_hints->y);
++ xsurface->size_hints->width = unscale(xwm, xsurface->size_hints->width);
++ xsurface->size_hints->height = unscale(xwm, xsurface->size_hints->height);
+ }
+
+ #define MWM_HINTS_FLAGS_FIELD 0
+--
+2.41.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 32e209fa96a1..8add3ee6c6d8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,8 @@
# Contributor: Adrian Perez de Castro <aperez@igalia.com>
# Contributor: Antonin Décimo <antonin dot decimo at gmail dot com>
pkgname=wlroots-hidpi-xprop-git
-pkgver=0.17.0.20230309.185147
-pkgrel=1
+pkgver=0.17.0.20230803.144028
+pkgrel=2
license=(MIT)
pkgdesc='Modular Wayland compositor library (git version, with patches)'
url=https://gitlab.freedesktop.org/wlroots/wlroots
@@ -40,10 +40,12 @@ makedepends=(
xorgproto)
source=("${pkgname}::git+${url}.git"
0001-xwayland-support-HiDPI-scale.patch
- 0002-Fix-configure_notify-event.patch)
+ 0002-Fix-configure_notify-event.patch
+ 0003-Fix-size-hints-under-Xwayland-scaling.patch)
sha512sums=('SKIP'
- '0595261b7beaa382f351b74d207956a7d36e05db4e96093d68773975cd2a6d6022a03e2aee927b1286bfd382d7c9d5ec22c747b501c2b0cd9e33f1e031a00022'
- '00c0c841f6c78d941d5128f9e0337dfd36245b74f82b53a73cc453b8cd4b09d3788f5d2d397db5cacd7445f17ff07dd8875954b5d570fcb6468e3b15060cb69a')
+ 'e94c5aafa13d7b78a9e0245a78c6b937f64ac78472f22afc2ca712c330212d6f69579139b103b0fc1515e901725a91ed8132d5be58be300fd45ca57c8ca80761'
+ 'c89c9aaa26457e64dff3530c9042afbbfd45a41dcffb01020c512eaaa359811bc16e929003ef56eb6b77f380ac0381b8382cc09da6e78ca0e6d0b2642b2a68bf'
+ 'd54d1faf46a390492ae2bc44238185aead9231b41dbf76567dd0dc4b85579edd5bef29a5ee22062993d06bbf24954216ebfe9a3da4ee67cd5c8b5121925e3483')
install=wlroots-hidpi-xprop-git.install
pkgver () {
cd "${pkgname}"
@@ -59,6 +61,7 @@ prepare () {
git revert -n 18595000f3a21502fd60bf213122859cc348f9af
patch -Np1 < ../0001-xwayland-support-HiDPI-scale.patch
patch -Np1 < ../0002-Fix-configure_notify-event.patch
+ patch -Np1 < ../0003-Fix-size-hints-under-Xwayland-scaling.patch
}
build () {