aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEcmel Berk Canlıer2021-12-14 21:28:11 +0300
committerEcmel Berk Canlıer2021-12-14 21:28:19 +0300
commit1894a7050135be8a088113619926c251449cebf7 (patch)
treea7748a7773082ec4968852b999b0de44313be892
parent4e4810ebf0d8238b385947d46c2fef4fbb582ed5 (diff)
downloadaur-1894a7050135be8a088113619926c251449cebf7.tar.gz
Update O_NONBLOCK patches, remove stale patch
-rw-r--r--.SRCINFO10
-rw-r--r--0001-set-O_NONBLOCK-on-repeat-timerfd.patch33
-rw-r--r--0002-Continue-poll-if-timerfd-cant-be-read.patch46
-rw-r--r--0003-Don-t-crash-on-calls-to-focus-or-icon.patch (renamed from 0002-Don-t-crash-on-calls-to-focus-or-icon.patch)0
-rw-r--r--0004-Do-not-crash-on-window-position-set.patch27
-rw-r--r--0004-fix-broken-opengl-screenshots-on-mutter.patch (renamed from 0003-fix-broken-opengl-screenshots-on-mutter.patch)0
-rw-r--r--PKGBUILD12
7 files changed, 76 insertions, 52 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 25c30a2f8b02..53ad9b1bfc94 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -25,13 +25,13 @@ pkgbase = glfw-wayland-minecraft
conflicts = glfw-wayland
source = https://github.com/glfw/glfw/archive/3.3.6.tar.gz
source = 0001-set-O_NONBLOCK-on-repeat-timerfd.patch
- source = 0002-Don-t-crash-on-calls-to-focus-or-icon.patch
- source = 0003-fix-broken-opengl-screenshots-on-mutter.patch
- source = 0004-Do-not-crash-on-window-position-set.patch
+ source = 0002-Continue-poll-if-timerfd-cant-be-read.patch
+ source = 0003-Don-t-crash-on-calls-to-focus-or-icon.patch
+ source = 0004-fix-broken-opengl-screenshots-on-mutter.patch
sha512sums = 4c295c5f4c02f6ede125fce67c52a97450f552f3985b664745bd8a836c1d6d69c04727c956fd26ec61f1e5fd9c074a28dcf6b1d1800f118444eef066f048b201
- sha512sums = e90c5995f405dc5d0581c597719fb1bf0d9335cec162506e34e37c676a4d6eee4a50f2c9d5d1bd1a27f3668ea4a0570db24a10aad7145cd8688e25523d497de8
+ sha512sums = 0f43d8a4c6c7e8946d302383e188b618694f122689d0142efcfa227f8fff5d9e655bf422c892533d2dc661751cb507dc14d784e8273b9ebfb847a55becc6c8ea
+ sha512sums = 0887d28a76e76c7fb6853b51ccb983ae5e69a22a6d0e31522592ad4fcbb36f608ad3bcf07d41cfe6da5bac64495f4a714c261e00ccfa2260900a18f1e034ffc9
sha512sums = 02fbbb28f6f6ffae3b5b32aac76218b917229e491981e4576054e96a78c7a3dfec3f3b2ffb939d47188b5d47681805c05d66b6fd75ad18b1d225655187ddfb9a
sha512sums = 3ca405894fb3549c0bba69fd9f3b5bc5ade1d010e5d82a76c8c2684fd8f008976ad81344b842993a6620e7935c177c524acd2bf1d43c9790dd404a845bdcef72
- sha512sums = 77732e58d6a6b3406ded5aa208b77bcdcaee808ed9a624ea2f41331a1231a96589bb0608d88835f7081f1fdb8b538e63f9cdc8d8fdbb0ce4b1d588c667782af1
pkgname = glfw-wayland-minecraft
diff --git a/0001-set-O_NONBLOCK-on-repeat-timerfd.patch b/0001-set-O_NONBLOCK-on-repeat-timerfd.patch
index 3d24c220f741..e21cf69be0e3 100644
--- a/0001-set-O_NONBLOCK-on-repeat-timerfd.patch
+++ b/0001-set-O_NONBLOCK-on-repeat-timerfd.patch
@@ -1,28 +1,33 @@
-From f57907bf3bbce52fbf2c5ca10206ad2b660f6cda Mon Sep 17 00:00:00 2001
+From 963e728881d7551aab0b843c79915f2419d4d36e Mon Sep 17 00:00:00 2001
From: Stone Tickle <lattis@mochiro.moe>
Date: Fri, 5 Jun 2020 12:51:25 +0900
-Subject: [PATCH 1/3] set O_NONBLOCK on repeat timerfd
+Subject: [PATCH] Wayland: Set O_NONBLOCK on repeat timerfd
+Fixes #1710
+Fixes #1711
---
- src/wl_init.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ src/wl_init.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wl_init.c b/src/wl_init.c
-index 49e7cc52..7d90e6ee 100644
+index acfe477d4..bba908fa9 100644
--- a/src/wl_init.c
+++ b/src/wl_init.c
-@@ -1165,8 +1165,9 @@ int _glfwPlatformInit(void)
- _glfwInitTimerPOSIX();
+@@ -1336,7 +1336,7 @@ int _glfwInitWayland(void)
_glfw.wl.timerfd = -1;
-- if (_glfw.wl.seatVersion >= 4)
+ if (_glfw.wl.seatVersion >= 4)
- _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
-+ if (_glfw.wl.seatVersion >= 4) {
+ _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
-+ }
- if (_glfw.wl.pointer && _glfw.wl.shm)
+ if (!_glfw.wl.wmBase)
{
---
-2.32.0
-
+@@ -1370,7 +1370,7 @@ int _glfwInitWayland(void)
+ wl_cursor_theme_load(cursorTheme, 2 * cursorSize, _glfw.wl.shm);
+ _glfw.wl.cursorSurface =
+ wl_compositor_create_surface(_glfw.wl.compositor);
+- _glfw.wl.cursorTimerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
++ _glfw.wl.cursorTimerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
+ }
+
+ if (_glfw.wl.seat && _glfw.wl.dataDeviceManager)
diff --git a/0002-Continue-poll-if-timerfd-cant-be-read.patch b/0002-Continue-poll-if-timerfd-cant-be-read.patch
new file mode 100644
index 000000000000..5eb7513fa298
--- /dev/null
+++ b/0002-Continue-poll-if-timerfd-cant-be-read.patch
@@ -0,0 +1,46 @@
+From 68879081cb39f50bd65d12e0f1869f5970dc71b9 Mon Sep 17 00:00:00 2001
+From: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
+Date: Tue, 14 Dec 2021 09:29:01 +0100
+Subject: [PATCH] =?UTF-8?q?Wayland:=20Continue=20poll()=20if=20timerfd=20c?=
+ =?UTF-8?q?an=E2=80=99t=20be=20read?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In the case the key repeat timerfd was interrupted before read(), the
+cursor timerfd wasn’t read at all even when it could.
+
+Related to #1711
+---
+ src/wl_window.c | 11 +++--------
+ 2 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/src/wl_window.c b/src/wl_window.c
+index b4c59d693..8ed803b4b 100644
+--- a/src/wl_window.c
++++ b/src/wl_window.c
+@@ -751,10 +751,7 @@ static void handleEvents(int timeout)
+ if (fds[1].revents & POLLIN)
+ {
+ read_ret = read(_glfw.wl.timerfd, &repeats, sizeof(repeats));
+- if (read_ret != 8)
+- return;
+-
+- if (_glfw.wl.keyboardFocus)
++ if (read_ret == 8 && _glfw.wl.keyboardFocus)
+ {
+ for (uint64_t i = 0; i < repeats; ++i)
+ {
+@@ -770,10 +767,8 @@ static void handleEvents(int timeout)
+ if (fds[2].revents & POLLIN)
+ {
+ read_ret = read(_glfw.wl.cursorTimerfd, &repeats, sizeof(repeats));
+- if (read_ret != 8)
+- return;
+-
+- incrementCursorImage(_glfw.wl.pointerFocus);
++ if (read_ret == 8)
++ incrementCursorImage(_glfw.wl.pointerFocus);
+ }
+ }
+ else
diff --git a/0002-Don-t-crash-on-calls-to-focus-or-icon.patch b/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
index 7fdb135903c3..7fdb135903c3 100644
--- a/0002-Don-t-crash-on-calls-to-focus-or-icon.patch
+++ b/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
diff --git a/0004-Do-not-crash-on-window-position-set.patch b/0004-Do-not-crash-on-window-position-set.patch
deleted file mode 100644
index 1fe2fe186967..000000000000
--- a/0004-Do-not-crash-on-window-position-set.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 071e14a3dda0ab312f70dbbbdf987c5933adfc8a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ecmel=20Berk=20Canl=C4=B1er?= <me@ecmelberk.com>
-Date: Fri, 25 Jun 2021 02:06:33 +0300
-Subject: [PATCH 4/4] Do not crash on window position set
-
-Apparently Minecraft Forge 1.16 does that?
----
- src/wl_window.c | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/src/wl_window.c b/src/wl_window.c
-index 3f8987b8..45d57b81 100644
---- a/src/wl_window.c
-+++ b/src/wl_window.c
-@@ -1061,9 +1061,6 @@ void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
- void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
- {
- // A Wayland client can not set its position, so just warn
--
-- _glfwInputError(GLFW_PLATFORM_ERROR,
-- "Wayland: Window position setting not supported");
- }
-
- void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
---
-2.32.0
-
diff --git a/0003-fix-broken-opengl-screenshots-on-mutter.patch b/0004-fix-broken-opengl-screenshots-on-mutter.patch
index f51e5c901924..f51e5c901924 100644
--- a/0003-fix-broken-opengl-screenshots-on-mutter.patch
+++ b/0004-fix-broken-opengl-screenshots-on-mutter.patch
diff --git a/PKGBUILD b/PKGBUILD
index 4f73512e0e7c..97bfd54eaa2b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -21,14 +21,14 @@ makedepends=('mesa' 'cmake' 'doxygen' 'vulkan-headers' 'vulkan-icd-loader'
'libxcursor' 'libxkbcommon' 'libxinerama')
source=("https://github.com/glfw/glfw/archive/${pkgver}.tar.gz"
"0001-set-O_NONBLOCK-on-repeat-timerfd.patch"
- "0002-Don-t-crash-on-calls-to-focus-or-icon.patch"
- "0003-fix-broken-opengl-screenshots-on-mutter.patch"
- "0004-Do-not-crash-on-window-position-set.patch")
+ "0002-Continue-poll-if-timerfd-cant-be-read.patch"
+ "0003-Don-t-crash-on-calls-to-focus-or-icon.patch"
+ "0004-fix-broken-opengl-screenshots-on-mutter.patch")
sha512sums=('4c295c5f4c02f6ede125fce67c52a97450f552f3985b664745bd8a836c1d6d69c04727c956fd26ec61f1e5fd9c074a28dcf6b1d1800f118444eef066f048b201'
- 'e90c5995f405dc5d0581c597719fb1bf0d9335cec162506e34e37c676a4d6eee4a50f2c9d5d1bd1a27f3668ea4a0570db24a10aad7145cd8688e25523d497de8'
+ '0f43d8a4c6c7e8946d302383e188b618694f122689d0142efcfa227f8fff5d9e655bf422c892533d2dc661751cb507dc14d784e8273b9ebfb847a55becc6c8ea'
+ '0887d28a76e76c7fb6853b51ccb983ae5e69a22a6d0e31522592ad4fcbb36f608ad3bcf07d41cfe6da5bac64495f4a714c261e00ccfa2260900a18f1e034ffc9'
'02fbbb28f6f6ffae3b5b32aac76218b917229e491981e4576054e96a78c7a3dfec3f3b2ffb939d47188b5d47681805c05d66b6fd75ad18b1d225655187ddfb9a'
- '3ca405894fb3549c0bba69fd9f3b5bc5ade1d010e5d82a76c8c2684fd8f008976ad81344b842993a6620e7935c177c524acd2bf1d43c9790dd404a845bdcef72'
- '77732e58d6a6b3406ded5aa208b77bcdcaee808ed9a624ea2f41331a1231a96589bb0608d88835f7081f1fdb8b538e63f9cdc8d8fdbb0ce4b1d588c667782af1')
+ '3ca405894fb3549c0bba69fd9f3b5bc5ade1d010e5d82a76c8c2684fd8f008976ad81344b842993a6620e7935c177c524acd2bf1d43c9790dd404a845bdcef72')
prepare() {
cd "$srcdir/glfw-$pkgver"