aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2023-07-18 10:34:00 +0000
committerJan Beich <jbeich@FreeBSD.org>2023-07-18 10:36:41 +0000
commitda56b05322fabe4e1876e4bc02634a01b9d33bd1 (patch)
treebb12b3ccb7bc18d6f9f9535b8f3813daf46429f5
parent15a137386957adc3ce25d745d54f582de5840dee (diff)
downloadports-da56b05322fabe4e1876e4bc02634a01b9d33bd1.tar.gz
ports-da56b05322fabe4e1876e4bc02634a01b9d33bd1.zip
x11-wm/hyprland: switch to upstream fixes
-rw-r--r--x11-wm/hyprland/Makefile8
-rw-r--r--x11-wm/hyprland/distinfo4
-rw-r--r--x11-wm/hyprland/files/patch-wlroots-0.17147
3 files changed, 10 insertions, 149 deletions
diff --git a/x11-wm/hyprland/Makefile b/x11-wm/hyprland/Makefile
index e33e63c0e3f6..1803d83df716 100644
--- a/x11-wm/hyprland/Makefile
+++ b/x11-wm/hyprland/Makefile
@@ -4,6 +4,10 @@ DISTVERSION= 0.27.0
PORTREVISION= 3
CATEGORIES= x11-wm wayland
+PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+= 8c9e2e1ff1d2.patch:-p1 # wlroots 0.17
+PATCHFILES+= 2e323a56716e.patch:-p1 # wlroots 0.17
+
MAINTAINER= jbeich@FreeBSD.org
COMMENT= Dynamic tiling Wayland compositor that doesn't sacrifice on its looks #'
WWW= https://hyprland.org/
@@ -38,10 +42,10 @@ X11_USE= XORG=xcb
X11_MESON_ENABLED= xwayland
post-extract:
-.if defined(PATCHFILES) && ${PATCHFILES:M147e96237006*}
+.if defined(PATCHFILES) && ${PATCHFILES:M8c9e2e1ff1d2*}
# Pretend to be a regular file for vendor patch to apply as is
@${RMDIR} ${WRKSRC}/subprojects/wlroots
- @${ECHO_CMD} "Subproject commit 6668c822b3bf58ca5af5d370ef03b075be3e4d27" \
+ @${ECHO_CMD} "Subproject commit 7e7633abf09b362d0bad9e3fc650fd692369291d" \
>${WRKSRC}/subprojects/wlroots
.endif
diff --git a/x11-wm/hyprland/distinfo b/x11-wm/hyprland/distinfo
index aa6f4cba9594..724258d3ff59 100644
--- a/x11-wm/hyprland/distinfo
+++ b/x11-wm/hyprland/distinfo
@@ -7,3 +7,7 @@ SHA256 (canihavesomecoffee-udis86-1.7.2-186-g5336633_GH0.tar.gz) = 69aff959179ff
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 (8c9e2e1ff1d2.patch) = 4352f3db32c1155da937fdccd10493919b8f5bc5347050c3a60bf84f3a8d043b
+SIZE (8c9e2e1ff1d2.patch) = 9958
+SHA256 (2e323a56716e.patch) = b06846bfca32bf376cca21e6cf6daf1eedf83b73600d4f96602632650e4b5322
+SIZE (2e323a56716e.patch) = 981
diff --git a/x11-wm/hyprland/files/patch-wlroots-0.17 b/x11-wm/hyprland/files/patch-wlroots-0.17
deleted file mode 100644
index 53bc2554205b..000000000000
--- a/x11-wm/hyprland/files/patch-wlroots-0.17
+++ /dev/null
@@ -1,147 +0,0 @@
-Apply https://github.com/swaywm/sway/commit/6f1a3b6652b9
-
-../src/Compositor.cpp:461:5: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'?
- wlr_xcursor_manager_set_cursor_image(m_sWLRXCursorMgr, "left_ptr", m_sWLRCursor);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-../src/render/Renderer.cpp:1898:17: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'?
- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-../src/managers/input/InputManager.cpp:295:21: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'?
- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-../src/managers/input/InputManager.cpp:297:21: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'?
- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-../src/managers/input/InputManager.cpp:470:9: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'?
- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-../src/managers/input/InputManager.cpp:496:13: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'?
- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-../src/managers/input/InputManager.cpp:508:13: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'?
- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-../src/managers/input/InputManager.cpp:1431:5: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'?
- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, name.c_str(), g_pCompositor->m_sWLRCursor);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-../src/managers/input/InputManager.cpp:1441:9: error: use of undeclared identifier 'wlr_xcursor_manager_set_cursor_image'; did you mean 'wlr_xcursor_manager_get_xcursor'?
- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Apply https://github.com/swaywm/sway/commit/91079079690c
-
-../src/render/Renderer.cpp:60:9: error: use of undeclared identifier 'wlr_presentation_surface_sampled_on_output'; did you mean 'wlr_presentation_surface_textured_on_output'?
- wlr_presentation_surface_sampled_on_output(g_pCompositor->m_sWLRPresentation, surface, RDATA->pMonitor->output);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-../src/render/Renderer.cpp:780:5: error: use of undeclared identifier 'wlr_presentation_surface_sampled_on_output'; did you mean 'wlr_presentation_surface_textured_on_output'?
- wlr_presentation_surface_sampled_on_output(g_pCompositor->m_sWLRPresentation, PSURFACE, pMonitor->output);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
---- src/Compositor.cpp.orig 2023-07-11 02:50:09 UTC
-+++ src/Compositor.cpp
-@@ -458,7 +458,7 @@ void CCompositor::startCompositor() {
- throw std::runtime_error("The backend could not start!");
- }
-
-- wlr_xcursor_manager_set_cursor_image(m_sWLRXCursorMgr, "left_ptr", m_sWLRCursor);
-+ wlr_cursor_set_xcursor(m_sWLRCursor, m_sWLRXCursorMgr, "left_ptr");
-
- #ifdef USES_SYSTEMD
- if (sd_booted() > 0)
---- src/managers/input/InputManager.cpp.orig 2023-05-29 17:17:38 UTC
-+++ src/managers/input/InputManager.cpp
-@@ -292,9 +292,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bo
- if (g_pHyprRenderer->m_bHasARenderedCursor) {
- // TODO: maybe wrap?
- if (m_ecbClickBehavior == CLICKMODE_KILL)
-- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor);
-+ wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "crosshair");
- else
-- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
-+ wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "left_ptr");
- }
-
- m_bEmptyFocusCursorSet = true;
-@@ -361,7 +361,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bo
- // if (!m_bCursorImageOverridden) {
- // if (!VECINRECT(m_vLastCursorPosFloored, pFoundWindow->m_vRealPosition.vec().x, pFoundWindow->m_vRealPosition.vec().y,
- // pFoundWindow->m_vRealPosition.vec().x + pFoundWindow->m_vRealSize.vec().x, pFoundWindow->m_vRealPosition.vec().y + pFoundWindow->m_vRealSize.vec().y)) {
-- // wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
-+ // wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "left_ptr");
- // cursorSurfaceInfo.bUsed = false;
- // } else if (!cursorSurfaceInfo.bUsed) {
- // cursorSurfaceInfo.bUsed = true;
-@@ -467,7 +467,7 @@ void CInputManager::processMouseRequest(wlr_seat_point
- }
-
- if (m_ecbClickBehavior == CLICKMODE_KILL) {
-- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor);
-+ wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "crosshair");
- return;
- }
-
-@@ -493,7 +493,7 @@ void CInputManager::setClickMode(eClickBehaviorMode mo
- case CLICKMODE_DEFAULT:
- Debug::log(LOG, "SetClickMode: DEFAULT");
- m_ecbClickBehavior = CLICKMODE_DEFAULT;
-- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
-+ wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "left_ptr");
- break;
-
- case CLICKMODE_KILL:
-@@ -505,7 +505,7 @@ void CInputManager::setClickMode(eClickBehaviorMode mo
- refocus();
-
- // set cursor
-- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor);
-+ wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "crosshair");
- break;
- default: break;
- }
-@@ -1428,7 +1428,7 @@ void CInputManager::setCursorImageUntilUnset(std::stri
- }
-
- void CInputManager::setCursorImageUntilUnset(std::string name) {
-- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, name.c_str(), g_pCompositor->m_sWLRCursor);
-+ wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, name.c_str());
- m_bCursorImageOverridden = true;
- }
-
-@@ -1438,7 +1438,7 @@ void CInputManager::unsetCursorImage() {
-
- m_bCursorImageOverridden = false;
- if (!g_pHyprRenderer->m_bWindowRequestedCursorHide)
-- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
-+ wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "left_ptr");
- }
-
- std::string CInputManager::deviceNameToInternalString(std::string in) {
---- src/render/Renderer.cpp.orig 2023-07-11 02:50:09 UTC
-+++ src/render/Renderer.cpp
-@@ -57,7 +57,7 @@ void renderSurface(struct wlr_surface* surface, int x,
-
- if (!g_pHyprRenderer->m_bBlockSurfaceFeedback) {
- wlr_surface_send_frame_done(surface, RDATA->when);
-- wlr_presentation_surface_sampled_on_output(g_pCompositor->m_sWLRPresentation, surface, RDATA->pMonitor->output);
-+ wlr_presentation_surface_textured_on_output(g_pCompositor->m_sWLRPresentation, surface, RDATA->pMonitor->output);
- }
-
- // reset the UV, we might've set it above
-@@ -777,7 +777,7 @@ bool CHyprRenderer::attemptDirectScanout(CMonitor* pMo
- timespec now;
- clock_gettime(CLOCK_MONOTONIC, &now);
- wlr_surface_send_frame_done(PSURFACE, &now);
-- wlr_presentation_surface_sampled_on_output(g_pCompositor->m_sWLRPresentation, PSURFACE, pMonitor->output);
-+ wlr_presentation_surface_scanned_out_on_output(g_pCompositor->m_sWLRPresentation, PSURFACE, pMonitor->output);
-
- if (wlr_output_commit(pMonitor->output)) {
- if (!m_pLastScanout) {
-@@ -1916,7 +1916,7 @@ void CHyprRenderer::ensureCursorRenderingMode() {
- m_bHasARenderedCursor = true;
-
- if (!m_bWindowRequestedCursorHide)
-- wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
-+ wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, "left_ptr");
-
- Debug::log(LOG, "Showing the cursor (timeout)");
-