git: 49e62cc39f54 - main - x11-wm/hyprland: Fix a few seconds of freeze when window is closing
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 10 Apr 2026 14:23:46 UTC
The branch main has been updated by tagattie:
URL: https://cgit.FreeBSD.org/ports/commit/?id=49e62cc39f5429fa5ef6ad0785b3da7230bf03f0
commit 49e62cc39f5429fa5ef6ad0785b3da7230bf03f0
Author: Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2026-04-10 14:21:48 +0000
Commit: Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2026-04-10 14:23:37 +0000
x11-wm/hyprland: Fix a few seconds of freeze when window is closing
Reported by: K. Solowoniuk (via private email)
---
x11-wm/hyprland/Makefile | 1 +
x11-wm/hyprland/files/patch-src_render_Framebuffer.cpp | 14 ++++++++++++++
x11-wm/hyprland/files/patch-src_render_OpenGL.cpp | 16 ++++++++++++++++
3 files changed, 31 insertions(+)
diff --git a/x11-wm/hyprland/Makefile b/x11-wm/hyprland/Makefile
index ddaa2bf6a4d9..68d4f1b87035 100644
--- a/x11-wm/hyprland/Makefile
+++ b/x11-wm/hyprland/Makefile
@@ -1,6 +1,7 @@
PORTNAME= hyprland
DISTVERSIONPREFIX= v
DISTVERSION= 0.54.3
+PORTREVISION= 1
CATEGORIES= x11-wm wayland
MASTER_SITES= https://github.com/hyprwm/Hyprland/releases/download/${DISTVERSIONFULL}/
DISTNAME= source-${DISTVERSIONFULL}
diff --git a/x11-wm/hyprland/files/patch-src_render_Framebuffer.cpp b/x11-wm/hyprland/files/patch-src_render_Framebuffer.cpp
new file mode 100644
index 000000000000..5cbe97c69b60
--- /dev/null
+++ b/x11-wm/hyprland/files/patch-src_render_Framebuffer.cpp
@@ -0,0 +1,14 @@
+--- src/render/Framebuffer.cpp.orig 2026-04-10 13:44:26 UTC
++++ src/render/Framebuffer.cpp
+@@ -136,5 +136,11 @@ void CFramebuffer::invalidate(const std::vector<GLenum
+ if (!isAllocated())
+ return;
+
++ GLint restoreFB = 0;
++ glGetIntegerv(GL_FRAMEBUFFER_BINDING, &restoreFB);
++
++ glBindFramebuffer(GL_FRAMEBUFFER, m_fb);
+ glInvalidateFramebuffer(GL_FRAMEBUFFER, attachments.size(), attachments.data());
++
++ glBindFramebuffer(GL_FRAMEBUFFER, restoreFB);
+ }
diff --git a/x11-wm/hyprland/files/patch-src_render_OpenGL.cpp b/x11-wm/hyprland/files/patch-src_render_OpenGL.cpp
new file mode 100644
index 000000000000..97fce13abb32
--- /dev/null
+++ b/x11-wm/hyprland/files/patch-src_render_OpenGL.cpp
@@ -0,0 +1,16 @@
+--- src/render/OpenGL.cpp.orig 2026-03-27 18:19:38 UTC
++++ src/render/OpenGL.cpp
+@@ -813,13 +813,9 @@ void CHyprOpenGLImpl::end() {
+ }
+
+ // invalidate our render FBs to signal to the driver we don't need them anymore
+- m_renderData.pCurrentMonData->mirrorFB.bind();
+ m_renderData.pCurrentMonData->mirrorFB.invalidate({GL_STENCIL_ATTACHMENT, GL_COLOR_ATTACHMENT0});
+- m_renderData.pCurrentMonData->mirrorSwapFB.bind();
+ m_renderData.pCurrentMonData->mirrorSwapFB.invalidate({GL_STENCIL_ATTACHMENT, GL_COLOR_ATTACHMENT0});
+- m_renderData.pCurrentMonData->offloadFB.bind();
+ m_renderData.pCurrentMonData->offloadFB.invalidate({GL_STENCIL_ATTACHMENT, GL_COLOR_ATTACHMENT0});
+- m_renderData.pCurrentMonData->offMainFB.bind();
+ m_renderData.pCurrentMonData->offMainFB.invalidate({GL_STENCIL_ATTACHMENT, GL_COLOR_ATTACHMENT0});
+
+ // reset our data