aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore6
-rw-r--r--0001-Wayland-Set-O_NONBLOCK-on-repeat-timerfd.patch (renamed from 0001-set-O_NONBLOCK-on-repeat-timerfd.patch)12
-rw-r--r--0002-Wayland-Continue-poll-if-timerfd-can-t-be-read.patch (renamed from 0002-Continue-poll-if-timerfd-cant-be-read.patch)16
-rw-r--r--0003-Don-t-crash-on-calls-to-focus-or-icon.patch23
-rw-r--r--0004-wayland-fix-broken-opengl-screenshots-on-mutter.patch (renamed from 0004-fix-broken-opengl-screenshots-on-mutter.patch)13
-rw-r--r--0005-Add-warning-about-being-an-unofficial-patch.patch28
-rw-r--r--PKGBUILD18
8 files changed, 80 insertions, 54 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a050f88dd868..6f144815b3ff 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = glfw-wayland-minecraft
pkgdesc = A free, open source, portable framework for graphical application development (wayland, patched for Minecraft)
pkgver = 3.3.6
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/Admicos/minecraft-wayland
arch = x86_64
license = custom:ZLIB
@@ -24,14 +24,16 @@ pkgbase = glfw-wayland-minecraft
conflicts = glfw
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-Continue-poll-if-timerfd-cant-be-read.patch
+ source = 0001-Wayland-Set-O_NONBLOCK-on-repeat-timerfd.patch
+ source = 0002-Wayland-Continue-poll-if-timerfd-can-t-be-read.patch
source = 0003-Don-t-crash-on-calls-to-focus-or-icon.patch
- source = 0004-fix-broken-opengl-screenshots-on-mutter.patch
+ source = 0004-wayland-fix-broken-opengl-screenshots-on-mutter.patch
+ source = 0005-Add-warning-about-being-an-unofficial-patch.patch
sha512sums = 4c295c5f4c02f6ede125fce67c52a97450f552f3985b664745bd8a836c1d6d69c04727c956fd26ec61f1e5fd9c074a28dcf6b1d1800f118444eef066f048b201
- sha512sums = 0f43d8a4c6c7e8946d302383e188b618694f122689d0142efcfa227f8fff5d9e655bf422c892533d2dc661751cb507dc14d784e8273b9ebfb847a55becc6c8ea
- sha512sums = 0887d28a76e76c7fb6853b51ccb983ae5e69a22a6d0e31522592ad4fcbb36f608ad3bcf07d41cfe6da5bac64495f4a714c261e00ccfa2260900a18f1e034ffc9
- sha512sums = 02fbbb28f6f6ffae3b5b32aac76218b917229e491981e4576054e96a78c7a3dfec3f3b2ffb939d47188b5d47681805c05d66b6fd75ad18b1d225655187ddfb9a
- sha512sums = 3ca405894fb3549c0bba69fd9f3b5bc5ade1d010e5d82a76c8c2684fd8f008976ad81344b842993a6620e7935c177c524acd2bf1d43c9790dd404a845bdcef72
+ sha512sums = a7f48ed4ada21aff8c9184ed5a87b960ab0691ed82581af1510c4f529ad86c44b2d16dc1dc3cc2b8de8c60ae804c8e85404a48df394fbfbeb6a7629fce6a21e0
+ sha512sums = f04d3280fbcefd06248a4e7746900df9fc798440b0b056a39c95005d0660a348335a02d1d76daed7a8c5b4d757ee285366a97a51fb5751f554a998a9b26ac250
+ sha512sums = 28a7a218a904175f6a51bf11bad359438276e83b2fa1a20b74377bbb418fa1b5867239c422f866d01c37315ebce9d916dbdda1140abed5ec0b23b04c43a57202
+ sha512sums = 99a65117e59473abdbc5e92062682117a6b5d20bb0bae2a92833ef2fa2f83e79e974721d70074f3f8c07f277476584102588002568e8c5e6ba01f63075672fe4
+ sha512sums = 997a3cd6470ee958e75422415e7582fb11ffa2e7b718cdf54005e203de480d589f3c49fd88b39b1c8d3c89cc1a9444cdc37b340a797c93fccd20dca0a08da747
pkgname = glfw-wayland-minecraft
diff --git a/.gitignore b/.gitignore
index d53251af9d26..12dc576dd5a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
*
+
!*.patch
!.SRCINFO
-!.gitignore
!PKGBUILD
-!README.md \ No newline at end of file
+
+!.gitignore
+!README.md
diff --git a/0001-set-O_NONBLOCK-on-repeat-timerfd.patch b/0001-Wayland-Set-O_NONBLOCK-on-repeat-timerfd.patch
index e21cf69be0e3..0699adad9c13 100644
--- a/0001-set-O_NONBLOCK-on-repeat-timerfd.patch
+++ b/0001-Wayland-Set-O_NONBLOCK-on-repeat-timerfd.patch
@@ -1,7 +1,7 @@
-From 963e728881d7551aab0b843c79915f2419d4d36e Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stone Tickle <lattis@mochiro.moe>
Date: Fri, 5 Jun 2020 12:51:25 +0900
-Subject: [PATCH] Wayland: Set O_NONBLOCK on repeat timerfd
+Subject: Wayland: Set O_NONBLOCK on repeat timerfd
Fixes #1710
Fixes #1711
@@ -10,19 +10,19 @@ Fixes #1711
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wl_init.c b/src/wl_init.c
-index acfe477d4..bba908fa9 100644
+index 0ce45a30..ba32707f 100644
--- a/src/wl_init.c
+++ b/src/wl_init.c
-@@ -1336,7 +1336,7 @@ int _glfwInitWayland(void)
+@@ -1169,7 +1169,7 @@ int _glfwPlatformInit(void)
_glfw.wl.timerfd = -1;
if (_glfw.wl.seatVersion >= 4)
- _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
+ _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
- if (!_glfw.wl.wmBase)
+ if (_glfw.wl.pointer && _glfw.wl.shm)
{
-@@ -1370,7 +1370,7 @@ int _glfwInitWayland(void)
+@@ -1196,7 +1196,7 @@ int _glfwPlatformInit(void)
wl_cursor_theme_load(cursorTheme, 2 * cursorSize, _glfw.wl.shm);
_glfw.wl.cursorSurface =
wl_compositor_create_surface(_glfw.wl.compositor);
diff --git a/0002-Continue-poll-if-timerfd-cant-be-read.patch b/0002-Wayland-Continue-poll-if-timerfd-can-t-be-read.patch
index 5eb7513fa298..f72f2dfb16c0 100644
--- a/0002-Continue-poll-if-timerfd-cant-be-read.patch
+++ b/0002-Wayland-Continue-poll-if-timerfd-can-t-be-read.patch
@@ -1,8 +1,8 @@
-From 68879081cb39f50bd65d12e0f1869f5970dc71b9 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 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?=
+Subject: =?UTF-8?q?Wayland:=20Continue=20poll()=20if=20timerfd=20can?=
+ =?UTF-8?q?=E2=80=99t=20be=20read?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -13,13 +13,13 @@ 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(-)
+ 1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/wl_window.c b/src/wl_window.c
-index b4c59d693..8ed803b4b 100644
+index db32f449..ec4e60cd 100644
--- a/src/wl_window.c
+++ b/src/wl_window.c
-@@ -751,10 +751,7 @@ static void handleEvents(int timeout)
+@@ -867,10 +867,7 @@ static void handleEvents(int timeout)
if (fds[1].revents & POLLIN)
{
read_ret = read(_glfw.wl.timerfd, &repeats, sizeof(repeats));
@@ -29,9 +29,9 @@ index b4c59d693..8ed803b4b 100644
- if (_glfw.wl.keyboardFocus)
+ if (read_ret == 8 && _glfw.wl.keyboardFocus)
{
- for (uint64_t i = 0; i < repeats; ++i)
+ for (i = 0; i < repeats; ++i)
{
-@@ -770,10 +767,8 @@ static void handleEvents(int timeout)
+@@ -886,10 +883,8 @@ static void handleEvents(int timeout)
if (fds[2].revents & POLLIN)
{
read_ret = read(_glfw.wl.cursorTimerfd, &repeats, sizeof(repeats));
diff --git a/0003-Don-t-crash-on-calls-to-focus-or-icon.patch b/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
index 7fdb135903c3..4ff500b74a49 100644
--- a/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
+++ b/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
@@ -1,36 +1,33 @@
-From db9b89fad9058172a844fe0a9faaae5a477c3fb3 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ecmel=20Berk=20Canl=C4=B1er?= <me@ecmelberk.com>
-Date: Fri, 25 Jun 2021 01:00:01 +0300
-Subject: [PATCH 2/3] Don't crash on calls to focus or icon
+Date: Tue, 28 Dec 2021 19:41:19 +0300
+Subject: Don't crash on calls to focus or icon
-Manually applying the following commit
- https://github.com/glfw/glfw/pull/1725/commits/e89e9aee41382508ed36594a4b028239cad5197b
---
- src/wl_window.c | 4 ----
- 1 file changed, 4 deletions(-)
+ src/wl_window.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/wl_window.c b/src/wl_window.c
-index d10861cd..3f8987b8 100644
+index ec4e60cd..b8fc39e4 100644
--- a/src/wl_window.c
+++ b/src/wl_window.c
-@@ -1047,8 +1047,6 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
+@@ -1042,8 +1042,7 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
void _glfwPlatformSetWindowIcon(_GLFWwindow* window,
int count, const GLFWimage* images)
{
- _glfwInputError(GLFW_PLATFORM_ERROR,
- "Wayland: Setting window icon not supported");
++ fprintf(stderr, "!!! Ignoring Error: Wayland: Setting window icon not supported\n");
}
void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
-@@ -1236,8 +1234,6 @@ void _glfwPlatformRequestWindowAttention(_GLFWwindow* window)
+@@ -1231,8 +1230,7 @@ void _glfwPlatformRequestWindowAttention(_GLFWwindow* window)
void _glfwPlatformFocusWindow(_GLFWwindow* window)
{
- _glfwInputError(GLFW_PLATFORM_ERROR,
- "Wayland: Focusing a window requires user interaction");
++ fprintf(stderr, "!!! Ignoring Error: Wayland: Focusing a window requires user interaction\n");
}
void _glfwPlatformSetWindowMonitor(_GLFWwindow* window,
---
-2.32.0
-
diff --git a/0004-fix-broken-opengl-screenshots-on-mutter.patch b/0004-wayland-fix-broken-opengl-screenshots-on-mutter.patch
index f51e5c901924..dd2f1d57c30a 100644
--- a/0004-fix-broken-opengl-screenshots-on-mutter.patch
+++ b/0004-wayland-fix-broken-opengl-screenshots-on-mutter.patch
@@ -1,21 +1,19 @@
-From ee84b919ad1f2d99a6805f3c00d7550908e8bd7b Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: ninja- <ninja-@users.noreply.github.com>
Date: Tue, 30 Jun 2020 19:41:52 +0200
-Subject: [PATCH 3/3] fix broken opengl screenshots on mutter
+Subject: wayland: fix broken opengl screenshots on mutter
-(admicos) This breaks more than just screenshots. On sway, the window is
-rendered half transparent. And we do not want that.
---
src/egl_context.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/egl_context.c b/src/egl_context.c
-index 6288fb7c..106da4f3 100644
+index 6b34f724..b0a810d8 100644
--- a/src/egl_context.c
+++ b/src/egl_context.c
@@ -175,6 +175,14 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
u->samples = getEGLConfigAttrib(n, EGL_SAMPLES);
- u->doublebuffer = GLFW_TRUE;
+ u->doublebuffer = desired->doublebuffer;
+#if defined(_GLFW_WAYLAND)
+ // Avoid using transparent buffer on Wayland if transparency is not requested.
@@ -28,6 +26,3 @@ index 6288fb7c..106da4f3 100644
u->handle = (uintptr_t) n;
usableCount++;
}
---
-2.32.0
-
diff --git a/0005-Add-warning-about-being-an-unofficial-patch.patch b/0005-Add-warning-about-being-an-unofficial-patch.patch
new file mode 100644
index 000000000000..3c72a2a07fc7
--- /dev/null
+++ b/0005-Add-warning-about-being-an-unofficial-patch.patch
@@ -0,0 +1,28 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ecmel=20Berk=20Canl=C4=B1er?= <me@ecmelberk.com>
+Date: Tue, 28 Dec 2021 19:25:30 +0300
+Subject: Add warning about being an unofficial patch
+
+This is just to help mod developers and other people who don't need to
+care about this patchset to ignore any issues that are not their fault.
+---
+ src/init.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/init.c b/src/init.c
+index 52ade583..1d7ca5d5 100644
+--- a/src/init.c
++++ b/src/init.c
+@@ -249,6 +249,12 @@ GLFWAPI int glfwInit(void)
+ _glfw.timer.offset = _glfwPlatformGetTimerValue();
+
+ glfwDefaultWindowHints();
++
++ fprintf(stderr, "!!! Patched GLFW from https://github.com/Admicos/minecraft-wayland\n"
++ "!!! If any issues with the window, or some issues with rendering, occur, "
++ "first try with the built-in GLFW, and if that solves the issue, report there first.\n"
++ "!!! Use outside Minecraft is untested, and things might break.\n");
++
+ return GLFW_TRUE;
+ }
+
diff --git a/PKGBUILD b/PKGBUILD
index 7ecb6d9b7760..522742fdfe55 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@
pkgname=glfw-wayland-minecraft
pkgdesc="A free, open source, portable framework for graphical application development (wayland, patched for Minecraft)"
pkgver=3.3.6
-pkgrel=2
+pkgrel=3
arch=('x86_64')
url="https://github.com/Admicos/minecraft-wayland"
license=('custom:ZLIB')
@@ -20,15 +20,17 @@ makedepends=('mesa' 'cmake' 'doxygen' 'vulkan-headers' 'vulkan-icd-loader'
'extra-cmake-modules' 'wayland-protocols' 'libxi' 'libxrandr'
'libxcursor' 'libxkbcommon' 'libxinerama')
source=("https://github.com/glfw/glfw/archive/${pkgver}.tar.gz"
- "0001-set-O_NONBLOCK-on-repeat-timerfd.patch"
- "0002-Continue-poll-if-timerfd-cant-be-read.patch"
+ "0001-Wayland-Set-O_NONBLOCK-on-repeat-timerfd.patch"
+ "0002-Wayland-Continue-poll-if-timerfd-can-t-be-read.patch"
"0003-Don-t-crash-on-calls-to-focus-or-icon.patch"
- "0004-fix-broken-opengl-screenshots-on-mutter.patch")
+ "0004-wayland-fix-broken-opengl-screenshots-on-mutter.patch"
+ "0005-Add-warning-about-being-an-unofficial-patch.patch")
sha512sums=('4c295c5f4c02f6ede125fce67c52a97450f552f3985b664745bd8a836c1d6d69c04727c956fd26ec61f1e5fd9c074a28dcf6b1d1800f118444eef066f048b201'
- '0f43d8a4c6c7e8946d302383e188b618694f122689d0142efcfa227f8fff5d9e655bf422c892533d2dc661751cb507dc14d784e8273b9ebfb847a55becc6c8ea'
- '0887d28a76e76c7fb6853b51ccb983ae5e69a22a6d0e31522592ad4fcbb36f608ad3bcf07d41cfe6da5bac64495f4a714c261e00ccfa2260900a18f1e034ffc9'
- '02fbbb28f6f6ffae3b5b32aac76218b917229e491981e4576054e96a78c7a3dfec3f3b2ffb939d47188b5d47681805c05d66b6fd75ad18b1d225655187ddfb9a'
- '3ca405894fb3549c0bba69fd9f3b5bc5ade1d010e5d82a76c8c2684fd8f008976ad81344b842993a6620e7935c177c524acd2bf1d43c9790dd404a845bdcef72')
+ 'a7f48ed4ada21aff8c9184ed5a87b960ab0691ed82581af1510c4f529ad86c44b2d16dc1dc3cc2b8de8c60ae804c8e85404a48df394fbfbeb6a7629fce6a21e0'
+ 'f04d3280fbcefd06248a4e7746900df9fc798440b0b056a39c95005d0660a348335a02d1d76daed7a8c5b4d757ee285366a97a51fb5751f554a998a9b26ac250'
+ '28a7a218a904175f6a51bf11bad359438276e83b2fa1a20b74377bbb418fa1b5867239c422f866d01c37315ebce9d916dbdda1140abed5ec0b23b04c43a57202'
+ '99a65117e59473abdbc5e92062682117a6b5d20bb0bae2a92833ef2fa2f83e79e974721d70074f3f8c07f277476584102588002568e8c5e6ba01f63075672fe4'
+ '997a3cd6470ee958e75422415e7582fb11ffa2e7b718cdf54005e203de480d589f3c49fd88b39b1c8d3c89cc1a9444cdc37b340a797c93fccd20dca0a08da747')
prepare() {
cd "$srcdir/glfw-$pkgver"