git: a756cde94cd2 - main - x11-wm/hyprland: update to 0.24.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 08 Apr 2023 14:56:35 UTC
The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=a756cde94cd298e47a7922200688a8cc568bdbef commit a756cde94cd298e47a7922200688a8cc568bdbef Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2023-04-08 12:08:56 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-04-08 14:55:11 +0000 x11-wm/hyprland: update to 0.24.0 Changes: https://github.com/hyprwm/Hyprland/releases/tag/v0.24.0 Reported by: GitHub (watch releases) --- x11-wm/hyprland/Makefile | 9 +- x11-wm/hyprland/distinfo | 8 +- x11-wm/hyprland/files/patch-wlroots-0.16 | 151 ++++++++++++++++++++----------- 3 files changed, 108 insertions(+), 60 deletions(-) diff --git a/x11-wm/hyprland/Makefile b/x11-wm/hyprland/Makefile index 8c625633f8ab..27adcafafe19 100644 --- a/x11-wm/hyprland/Makefile +++ b/x11-wm/hyprland/Makefile @@ -1,10 +1,10 @@ PORTNAME= hyprland DISTVERSIONPREFIX= v -DISTVERSION= 0.23.0beta -PORTREVISION= 3 +DISTVERSION= 0.24.0 CATEGORIES= x11-wm wayland PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES+= 31963f823b12.patch:-p1 # https://github.com/hyprwm/Hyprland/issues/1993 PATCHFILES+= 86852cdc78b8.patch:-p1 # https://github.com/hyprwm/Hyprland/issues/1995 MAINTAINER= jbeich@FreeBSD.org @@ -26,7 +26,7 @@ LIB_DEPENDS= libwayland-server.so:graphics/wayland \ USES= compiler:c++11-lib gl gnome meson pkgconfig xorg USE_GITHUB= yes USE_GL= egl opengl -USE_GNOME= cairo +USE_GNOME= cairo pango USE_XORG= pixman GH_ACCOUNT= hyprwm GH_PROJECT= Hyprland @@ -51,6 +51,9 @@ post-patch: # Respect PREFIX for wallpapers @${REINPLACE_CMD} 's,/usr/share,${DATADIR:H},' \ ${WRKSRC}/src/render/OpenGL.cpp +# Respect LOCALBASE for xdg-desktop-portal-hyprland installation + @${REINPLACE_CMD} 's,/usr/share,${LOCALBASE}/share,g' \ + ${WRKSRC}/src/Compositor.cpp .ifdef GH_TUPLE post-install: diff --git a/x11-wm/hyprland/distinfo b/x11-wm/hyprland/distinfo index 2bdcca15daec..afff69066ae3 100644 --- a/x11-wm/hyprland/distinfo +++ b/x11-wm/hyprland/distinfo @@ -1,11 +1,13 @@ -TIMESTAMP = 1678830991 -SHA256 (hyprwm-Hyprland-v0.23.0beta_GH0.tar.gz) = a866dc48d2c7fad6f9a57e890430a8c234ea9f8fcada6c6eafb95eaadadb1ab0 -SIZE (hyprwm-Hyprland-v0.23.0beta_GH0.tar.gz) = 745506 +TIMESTAMP = 1680955736 +SHA256 (hyprwm-Hyprland-v0.24.0_GH0.tar.gz) = 31a80d880a3d3c2f9115313958e54dcae3c15e3c8e900c783bacdfb8a8db1750 +SIZE (hyprwm-Hyprland-v0.24.0_GH0.tar.gz) = 756907 SHA256 (hyprwm-hyprland-protocols-301733a_GH0.tar.gz) = 3b3b4e948525f1d823313390b2551ea8969d0cbf82bd72e2a4a2ce2750552330 SIZE (hyprwm-hyprland-protocols-301733a_GH0.tar.gz) = 4852 SHA256 (canihavesomecoffee-udis86-1.7.2-186-g5336633_GH0.tar.gz) = 69aff959179ff6247b375b92e797221dbd8e078eabbf1366280b0532617e7fb8 SIZE (canihavesomecoffee-udis86-1.7.2-186-g5336633_GH0.tar.gz) = 116938 SHA256 (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = b5a9ff1793b1e2d388a3819bf35797002b1d2e40bb35a10c65605e0ea1435271 SIZE (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = 179289803 +SHA256 (31963f823b12.patch) = 7f12f62e5ed967f25d5c625d4dc802d689df79931e7540351056642bf6421c66 +SIZE (31963f823b12.patch) = 929 SHA256 (86852cdc78b8.patch) = 81e807d4f672be6d74110564de1ad79b4ea625e3b3ba9806d11a65daf3f08552 SIZE (86852cdc78b8.patch) = 754 diff --git a/x11-wm/hyprland/files/patch-wlroots-0.16 b/x11-wm/hyprland/files/patch-wlroots-0.16 index d63efaff3636..ea893bfada93 100644 --- a/x11-wm/hyprland/files/patch-wlroots-0.16 +++ b/x11-wm/hyprland/files/patch-wlroots-0.16 @@ -6,10 +6,11 @@ https://github.com/hyprwm/Hyprland/commit/c012e3d66b21 https://github.com/hyprwm/Hyprland/commit/d6b3bfc48e22 https://github.com/hyprwm/Hyprland/commit/a46abd8b1ada https://github.com/hyprwm/Hyprland/commit/a34b74766193 +https://github.com/hyprwm/Hyprland/commit/1a5d5bf6201b ---- src/Compositor.cpp.orig 2023-03-14 21:56:31 UTC +--- src/Compositor.cpp.orig 2023-04-08 12:08:56 UTC +++ src/Compositor.cpp -@@ -103,7 +103,7 @@ void CCompositor::initServer() { +@@ -104,7 +104,7 @@ void CCompositor::initServer() { if (LOGWLR && std::string(LOGWLR) == "1") wlr_log_init(WLR_DEBUG, Debug::wlrLog); @@ -18,7 +19,7 @@ https://github.com/hyprwm/Hyprland/commit/a34b74766193 if (!m_sWLRBackend) { Debug::log(CRIT, "m_sWLRBackend was NULL!"); -@@ -126,10 +126,11 @@ void CCompositor::initServer() { +@@ -127,10 +127,11 @@ void CCompositor::initServer() { wlr_renderer_init_wl_shm(m_sWLRRenderer, m_sWLDisplay); if (wlr_renderer_get_dmabuf_texture_formats(m_sWLRRenderer)) { @@ -50,49 +51,35 @@ https://github.com/hyprwm/Hyprland/commit/a34b74766193 m_sWLRTextInputMgr = wlr_text_input_manager_v3_create(m_sWLDisplay); ---- src/events/Events.hpp.orig 2023-03-14 21:56:31 UTC +--- src/events/Events.hpp.orig 2023-04-08 12:08:56 UTC +++ src/events/Events.hpp @@ -97,7 +97,6 @@ namespace Events { // Monitor part 2 the sequel DYNLISTENFUNC(monitorFrame); DYNLISTENFUNC(monitorDestroy); - DYNLISTENFUNC(monitorStateRequest); + DYNLISTENFUNC(monitorDamage); + DYNLISTENFUNC(monitorNeedsFrame); - // XWayland - LISTENER(readyXWayland); ---- src/events/Monitors.cpp.orig 2023-03-14 21:56:31 UTC +--- src/events/Monitors.cpp.orig 2023-04-08 12:08:56 UTC +++ src/events/Monitors.cpp -@@ -281,10 +281,11 @@ void Events::listener_monitorFrame(void* owner, void* - damageBlinkCleanup = 0; - } - -- if (wlr_renderer_begin(g_pCompositor->m_sWLRRenderer, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y)) { -- wlr_output_render_software_cursors(PMONITOR->output, NULL); -- wlr_renderer_end(g_pCompositor->m_sWLRRenderer); -- } -+ wlr_renderer_begin(g_pCompositor->m_sWLRRenderer, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y); -+ -+ wlr_output_render_software_cursors(PMONITOR->output, NULL); -+ -+ wlr_renderer_end(g_pCompositor->m_sWLRRenderer); +@@ -190,13 +190,6 @@ void Events::listener_monitorDestroy(void* owner, void } + } - g_pHyprOpenGL->end(); -@@ -357,11 +358,4 @@ void Events::listener_monitorDestroy(void* owner, void - - std::erase_if(g_pCompositor->m_vRealMonitors, [&](std::shared_ptr<CMonitor>& el) { return el.get() == pMonitor; }); - } --} -- -void Events::listener_monitorStateRequest(void* owner, void* data) { - const auto PMONITOR = (CMonitor*)owner; - const auto E = (wlr_output_event_request_state*)data; - - wlr_output_commit_state(PMONITOR->output, E->state); - } ---- src/events/Windows.cpp.orig 2023-03-14 21:56:31 UTC +-} +- + void Events::listener_monitorDamage(void* owner, void* data) { + const auto PMONITOR = (CMonitor*)owner; + const auto E = (wlr_output_event_damage*)data; +--- src/events/Windows.cpp.orig 2023-04-08 12:08:56 UTC +++ src/events/Windows.cpp -@@ -821,7 +821,7 @@ void Events::listener_activateXDG(wl_listener* listene +@@ -846,7 +846,7 @@ void Events::listener_activateXDG(wl_listener* listene Debug::log(LOG, "Activate request for surface at %x", E->surface); @@ -101,20 +88,22 @@ https://github.com/hyprwm/Hyprland/commit/a34b74766193 return; const auto PWINDOW = g_pCompositor->getWindowFromSurface(E->surface); ---- src/helpers/Monitor.cpp.orig 2023-03-14 21:56:31 UTC +--- src/helpers/Monitor.cpp.orig 2023-04-08 12:08:56 UTC +++ src/helpers/Monitor.cpp -@@ -5,10 +5,8 @@ void CMonitor::onConnect(bool noRule) { +@@ -19,12 +19,10 @@ void CMonitor::onConnect(bool noRule) { void CMonitor::onConnect(bool noRule) { hyprListener_monitorDestroy.removeCallback(); hyprListener_monitorFrame.removeCallback(); - hyprListener_monitorStateRequest.removeCallback(); + hyprListener_monitorDamage.removeCallback(); + hyprListener_monitorNeedsFrame.removeCallback(); hyprListener_monitorFrame.initCallback(&output->events.frame, &Events::listener_monitorFrame, this); hyprListener_monitorDestroy.initCallback(&output->events.destroy, &Events::listener_monitorDestroy, this); - hyprListener_monitorStateRequest.initCallback(&output->events.request_state, &Events::listener_monitorStateRequest, this); + hyprListener_monitorDamage.initCallback(&output->events.damage, &Events::listener_monitorDamage, this); + hyprListener_monitorNeedsFrame.initCallback(&output->events.needs_frame, &Events::listener_monitorNeedsFrame, this); - if (m_bEnabled) { - wlr_output_enable(output, 1); -@@ -209,7 +207,7 @@ void CMonitor::onDisconnect() { +@@ -238,7 +236,7 @@ void CMonitor::onDisconnect() { if (!BACKUPMON) { Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend."); @@ -123,31 +112,49 @@ https://github.com/hyprwm/Hyprland/commit/a34b74766193 hyprListener_monitorDestroy.removeCallback(); g_pCompositor->m_bUnsafeState = true; ---- src/helpers/Monitor.hpp.orig 2023-03-14 21:56:31 UTC +@@ -295,7 +293,7 @@ void CMonitor::onDisconnect() { + std::erase_if(g_pCompositor->m_vMonitors, [&](std::shared_ptr<CMonitor>& el) { return el.get() == this; }); + } + +-void CMonitor::addDamage(const pixman_region32_t* rg) { ++void CMonitor::addDamage(pixman_region32_t* rg) { + if (wlr_damage_ring_add(&damage, rg)) + g_pCompositor->scheduleFrameForMonitor(this); + } +--- src/helpers/Monitor.hpp.orig 2023-04-08 12:08:56 UTC +++ src/helpers/Monitor.hpp -@@ -56,7 +56,7 @@ class CMonitor { +@@ -64,7 +64,7 @@ class CMonitor { DYNLISTENER(monitorFrame); DYNLISTENER(monitorDestroy); - DYNLISTENER(monitorStateRequest); + DYNLISTENER(monitorMode); - - // hack: a group = workspaces on a monitor. - // I don't really care lol :P ---- src/helpers/SubsurfaceTree.cpp.orig 2023-03-14 21:56:31 UTC + DYNLISTENER(monitorDamage); + DYNLISTENER(monitorNeedsFrame); + +@@ -75,7 +75,7 @@ class CMonitor { + // methods + void onConnect(bool noRule); + void onDisconnect(); +- void addDamage(const pixman_region32_t* rg); ++ void addDamage(pixman_region32_t* rg); + void addDamage(const wlr_box* box); + void setMirror(const std::string&); + bool isMirror(); +--- src/helpers/SubsurfaceTree.cpp.orig 2023-04-08 12:08:56 UTC +++ src/helpers/SubsurfaceTree.cpp -@@ -3,8 +3,8 @@ void addSurfaceGlobalOffset(SSurfaceTreeNode* node, in - #include "../Compositor.hpp" +@@ -6,8 +6,8 @@ void addSurfaceGlobalOffset(SSurfaceTreeNode* node, in + if (!node->pSurface || !node->pSurface->exists()) + return; - void addSurfaceGlobalOffset(SSurfaceTreeNode* node, int* lx, int* ly) { -- *lx += node->pSurface->current.dx; -- *ly += node->pSurface->current.dy; -+ *lx += node->pSurface->sx; -+ *ly += node->pSurface->sy; +- *lx += node->pSurface->wlr()->current.dx; +- *ly += node->pSurface->wlr()->current.dy; ++ *lx += node->pSurface->wlr()->sx; ++ *ly += node->pSurface->wlr()->sy; if (node->offsetfn) { // This is the root node ---- src/managers/XWaylandManager.cpp.orig 2023-03-14 21:56:31 UTC +--- src/managers/XWaylandManager.cpp.orig 2023-04-08 12:08:56 UTC +++ src/managers/XWaylandManager.cpp @@ -35,16 +35,16 @@ void CHyprXWaylandManager::activateSurface(wlr_surface if (!pSurface) @@ -171,7 +178,7 @@ https://github.com/hyprwm/Hyprland/commit/a34b74766193 } } ---- src/managers/input/InputMethodRelay.cpp.orig 2023-03-14 21:56:31 UTC +--- src/managers/input/InputMethodRelay.cpp.orig 2023-04-08 12:08:56 UTC +++ src/managers/input/InputMethodRelay.cpp @@ -184,8 +184,8 @@ void CInputMethodRelay::updateInputPopup(SIMEPopup* pP Vector2D parentPos; @@ -195,7 +202,19 @@ https://github.com/hyprwm/Hyprland/commit/a34b74766193 if (PLS) { parentPos = Vector2D(PLS->geometry.x, PLS->geometry.y) + g_pCompositor->getMonitorFromID(PLS->monitorID)->vecPosition; ---- src/render/Renderer.cpp.orig 2023-03-14 21:56:31 UTC +--- src/protocols/ToplevelExport.cpp.orig 2023-04-08 12:08:56 UTC ++++ src/protocols/ToplevelExport.cpp +@@ -369,7 +369,8 @@ bool CToplevelExportProtocolManager::copyFrameShm(STop + g_pHyprRenderer->renderWindow(frame->pWindow, PMONITOR, now, false, RENDER_PASS_ALL, true, true); + g_pHyprRenderer->m_bBlockSurfaceFeedback = false; + +- if (frame->overlayCursor && wlr_renderer_begin(g_pCompositor->m_sWLRRenderer, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y)) { ++ if (frame->overlayCursor) { ++ wlr_renderer_begin(g_pCompositor->m_sWLRRenderer, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y); + // hack le massive + wlr_output_cursor* cursor; + const auto OFFSET = frame->pWindow->m_vRealPosition.vec() - PMONITOR->vecPosition; +--- src/render/Renderer.cpp.orig 2023-04-08 12:08:56 UTC +++ src/render/Renderer.cpp @@ -37,7 +37,7 @@ void renderSurface(struct wlr_surface* surface, int x, rounding -= 1; // to fix a border issue @@ -206,7 +225,31 @@ https://github.com/hyprwm/Hyprland/commit/a34b74766193 g_pHyprOpenGL->renderTexture(TEXTURE, &windowBox, RDATA->fadeAlpha * RDATA->alpha, rounding, true); } else { if (RDATA->blur) -@@ -746,20 +746,48 @@ void CHyprRenderer::setWindowScanoutMode(CWindow* pWin +@@ -665,9 +665,6 @@ bool CHyprRenderer::attemptDirectScanout(CMonitor* pMo + if (!pMonitor->mirrors.empty() || pMonitor->isMirror() || m_bDirectScanoutBlocked) + return false; // do not DS if this monitor is being mirrored. Will break the functionality. + +- if (!wlr_output_is_direct_scanout_allowed(pMonitor->output)) +- return false; +- + const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pMonitor->activeWorkspace); + + if (!PWORKSPACE || !PWORKSPACE->m_bHasFullscreenWindow || g_pInputManager->m_sDrag.drag || g_pCompositor->m_sSeat.exclusiveClient || pMonitor->specialWorkspaceID) +@@ -928,10 +925,9 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) + damageBlinkCleanup = 0; + } + +- if (wlr_renderer_begin(g_pCompositor->m_sWLRRenderer, pMonitor->vecPixelSize.x, pMonitor->vecPixelSize.y)) { +- wlr_output_render_software_cursors(pMonitor->output, NULL); +- wlr_renderer_end(g_pCompositor->m_sWLRRenderer); +- } ++ wlr_renderer_begin(g_pCompositor->m_sWLRRenderer, pMonitor->vecPixelSize.x, pMonitor->vecPixelSize.y); ++ wlr_output_render_software_cursors(pMonitor->output, NULL); ++ wlr_renderer_end(g_pCompositor->m_sWLRRenderer); + } + + g_pHyprOpenGL->end(); +@@ -1003,20 +999,48 @@ void CHyprRenderer::setWindowScanoutMode(CWindow* pWin return; } @@ -241,7 +284,7 @@ https://github.com/hyprwm/Hyprland/commit/a34b74766193 + if (!POUTPUTFORMATS) return; -- wlr_linux_dmabuf_v1_set_surface_feedback(g_pCompositor->m_sWLRLinuxDMABuf, g_pXWaylandManager->getWindowSurface(pWindow), &feedback); +- wlr_linux_dmabuf_v1_set_surface_feedback(g_pCompositor->m_sWLRLinuxDMABuf, pWindow->m_pWLSurface.wlr(), &feedback); - wlr_linux_dmabuf_feedback_v1_finish(&feedback); + const auto PRENDERERFORMATS = wlr_renderer_get_dmabuf_texture_formats(g_pCompositor->m_sWLRRenderer); + wlr_drm_format_set scanoutFormats = {0}; @@ -255,7 +298,7 @@ https://github.com/hyprwm/Hyprland/commit/a34b74766193 + + const wlr_linux_dmabuf_feedback_v1 FEEDBACK = {.main_device = rendererDevice, .tranches_len = sizeof(TRANCHES) / sizeof(TRANCHES[0]), .tranches = TRANCHES}; + -+ if (!wlr_linux_dmabuf_v1_set_surface_feedback(g_pCompositor->m_sWLRLinuxDMABuf, g_pXWaylandManager->getWindowSurface(pWindow), &FEEDBACK)) { ++ if (!wlr_linux_dmabuf_v1_set_surface_feedback(g_pCompositor->m_sWLRLinuxDMABuf, pWindow->m_pWLSurface.wlr(), &FEEDBACK)) { + Debug::log(ERR, "Error in scanout mode setting: wlr_linux_dmabuf_v1_set_surface_feedback returned false."); + } +