From b1e5cc66bdb20b002c93479490c3a317552210b3 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:45:02 +0100 Subject: core: Add support for hyprqtutils' update screen (#8651) * Nix: add hyprland-qtutils to PATH * flake.lock: update --------- Co-authored-by: Mihai Fufezan --- src/Compositor.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 1261d003..74a2c8d1 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -6,6 +6,7 @@ #include "managers/TokenManager.hpp" #include "managers/PointerManager.hpp" #include "managers/SeatManager.hpp" +#include "managers/VersionKeeperManager.hpp" #include "managers/eventLoop/EventLoopManager.hpp" #include #include @@ -645,6 +646,9 @@ void CCompositor::initManagers(eManagersInitStage stage) { Debug::log(LOG, "Creating the CursorManager!"); g_pCursorManager = std::make_unique(); + Debug::log(LOG, "Creating the VersionKeeper!"); + g_pVersionKeeperMgr = std::make_unique(); + Debug::log(LOG, "Starting XWayland"); g_pXWayland = std::make_unique(g_pCompositor->m_bEnableXwayland); } break; @@ -2610,7 +2614,8 @@ WORKSPACEID CCompositor::getNewSpecialID() { } void CCompositor::performUserChecks() { - static auto PNOCHECKXDG = CConfigValue("misc:disable_xdg_env_checks"); + static auto PNOCHECKXDG = CConfigValue("misc:disable_xdg_env_checks"); + static auto PNOCHECKQTUTILS = CConfigValue("misc:disable_hyprland_qtutils_check"); if (!*PNOCHECKXDG) { const auto CURRENT_DESKTOP_ENV = getenv("XDG_CURRENT_DESKTOP"); @@ -2622,6 +2627,13 @@ void CCompositor::performUserChecks() { } } + if (!*PNOCHECKQTUTILS) { + if (!executableExistsInPath("hyprland-dialog")) { + g_pHyprNotificationOverlay->addNotification( + "Your system does not have hyprland-qtutils installed. This is a runtime dependency for some dialogs. Consider installing it.", CHyprColor{}, 15000, ICON_WARNING); + } + } + if (g_pHyprOpenGL->failedAssetsNo > 0) { g_pHyprNotificationOverlay->addNotification(std::format("Hyprland failed to load {} essential asset{}, blame your distro's packager for doing a bad job at packaging!", g_pHyprOpenGL->failedAssetsNo, g_pHyprOpenGL->failedAssetsNo > 1 ? "s" : ""), -- cgit v1.2.3