From d2b5a2d526e0b642bffad2bc091c3abd9b3e426a Mon Sep 17 00:00:00 2001 From: Don Williams Date: Mon, 26 Jan 2026 12:56:24 -0500 Subject: [PATCH] Fixing the fix On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: assets/0002-start-hyprland-no-nixgl.patch --- assets/0002-start-hyprland-no-nixgl.patch | 94 ++++++++++++++--------- 1 file changed, 56 insertions(+), 38 deletions(-) diff --git a/assets/0002-start-hyprland-no-nixgl.patch b/assets/0002-start-hyprland-no-nixgl.patch index f597bfa..3aa613e 100644 --- a/assets/0002-start-hyprland-no-nixgl.patch +++ b/assets/0002-start-hyprland-no-nixgl.patch @@ -1,37 +1,46 @@ +diff --git a/start/src/core/Instance.cpp b/start/src/core/Instance.cpp +index 2f5007b..8c6c73c 100644 --- a/start/src/core/Instance.cpp +++ b/start/src/core/Instance.cpp -@@ -1,7 +1,6 @@ +@@ -1,8 +1,6 @@ #include "Instance.hpp" #include "State.hpp" #include "../helpers/Logger.hpp" -#include "../helpers/Nix.hpp" - +- #include #include -@@ -55,12 +54,7 @@ void CHyprlandInstance::runHyprlandThread(bool safeMode) { - procctl(P_PID, getpid(), PROC_PDEATHSIG_CTL, &sig); + #include +@@ -54,13 +52,7 @@ void CHyprlandInstance::runHyprlandThread(bool safeMode) { + int sig = SIGKILL; + procctl(P_PID, getpid(), PROC_PDEATHSIG_CTL, &sig); #endif +- +- if (Nix::shouldUseNixGL()) { +- argsStd.insert(argsStd.begin(), g_state->customPath.value_or("Hyprland")); +- args.insert(args.begin(), strdup(argsStd.front().c_str())); +- execvp("nixGL", args.data()); +- } else +- execvp(g_state->customPath.value_or("Hyprland").c_str(), args.data()); ++ execvp(g_state->customPath.value_or("Hyprland").c_str(), args.data()); -- if (Nix::shouldUseNixGL()) { -- argsStd.insert(argsStd.begin(), g_state->customPath.value_or("Hyprland")); -- args.insert(args.begin(), strdup(argsStd.front().c_str())); -- execvp("nixGL", args.data()); -- } else -- execvp(g_state->customPath.value_or("Hyprland").c_str(), args.data()); -+ execvp(g_state->customPath.value_or("Hyprland").c_str(), args.data()); - - g_logger->log(Hyprutils::CLI::LOG_ERR, "fork(): execvp failed: {}", strerror(errno)); - std::fflush(stdout); + g_logger->log(Hyprutils::CLI::LOG_ERR, "fork(): execvp failed: {}", strerror(errno)); + std::fflush(stdout); +diff --git a/start/src/core/State.hpp b/start/src/core/State.hpp +index d00a175..6cf73a9 100644 --- a/start/src/core/State.hpp +++ b/start/src/core/State.hpp @@ -8,7 +8,6 @@ struct SState { - std::span rawArgvNoBinPath; - std::optional customPath; -- bool noNixGl = false; + std::span rawArgvNoBinPath; + std::optional customPath; +- bool noNixGl = false; }; inline UP g_state = makeUnique(); +\ No newline at end of file +diff --git a/start/src/main.cpp b/start/src/main.cpp +index e73fcfa..30e68f0 100644 --- a/start/src/main.cpp +++ b/start/src/main.cpp @@ -3,7 +3,6 @@ @@ -41,33 +50,42 @@ -#include "helpers/Nix.hpp" #include "core/State.hpp" #include "core/Instance.hpp" + @@ -21,7 +20,6 @@ Any arguments after -- are passed to Hyprland. For Hyprland help, run start-hypr Additional arguments for start-hyprland: --path [path] -> Override Hyprland path - --no-nixgl -> Force disable nixGL )#"; -@@ -76,7 +74,6 @@ int main(int argc, const char** argv, const char** envp) { - continue; - } - if (arg == "--no-nixgl") { -- g_state->noNixGl = true; - continue; - } - } -@@ -87,15 +84,6 @@ int main(int argc, const char** argv, const char** envp) { - if (!g_state->rawArgvNoBinPath.empty()) - g_logger->log(Hyprutils::CLI::LOG_WARN, "Arguments after -- are passed to Hyprland"); -- // check if our environment is OK -- if (const auto RET = Nix::nixEnvironmentOk(); !RET) { -- g_logger->log(Hyprutils::CLI::LOG_ERR, "Nix environment check failed:\n{}", RET.error()); -- return 1; -- } + // +@@ -74,28 +72,13 @@ int main(int argc, const char** argv, const char** envp) { + + g_state->customPath = argv[++i]; + continue; +- } +- if (arg == "--no-nixgl") { +- g_state->noNixGl = true; +- continue; +- } +- } ++ } } + + if (startArgv != -1) + g_state->rawArgvNoBinPath = std::span{argv + startArgv, argc - startArgv}; + + if (!g_state->rawArgvNoBinPath.empty()) + g_logger->log(Hyprutils::CLI::LOG_WARN, "Arguments after -- are passed to Hyprland"); - -- if (Nix::shouldUseNixGL()) -- g_logger->log(Hyprutils::CLI::LOG_DEBUG, "Hyprland was compiled with Nix - will use nixGL"); +- // check if our environment is OK +- if (const auto RET = Nix::nixEnvironmentOk(); !RET) { +- g_logger->log(Hyprutils::CLI::LOG_ERR, "Nix environment check failed:\n{}", RET.error()); +- return 1; +- } - - bool safeMode = false; - while (true) { - g_instance = makeUnique(); +- if (Nix::shouldUseNixGL()) +- g_logger->log(Hyprutils::CLI::LOG_DEBUG, "Hyprland was compiled with Nix - will use nixGL"); +- + bool safeMode = false; + while (true) { + g_instance = makeUnique();