mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 16:50:04 +01:00
compositor: warn on start via a log about start-hyprland
This commit is contained in:
parent
18901b8e59
commit
f88deb928a
3 changed files with 10 additions and 3 deletions
|
|
@ -142,8 +142,9 @@ static void aqLog(Aquamarine::eBackendLogLevel level, std::string msg) {
|
||||||
Debug::log(aqLevelToHl(level), "[AQ] {}", msg);
|
Debug::log(aqLevelToHl(level), "[AQ] {}", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCompositor::setWatchdogFd(int fd) {
|
bool CCompositor::setWatchdogFd(int fd) {
|
||||||
m_watchdogWriteFd = Hyprutils::OS::CFileDescriptor{fd};
|
m_watchdogWriteFd = Hyprutils::OS::CFileDescriptor{fd};
|
||||||
|
return m_watchdogWriteFd.isValid() && !m_watchdogWriteFd.isClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCompositor::bumpNofile() {
|
void CCompositor::bumpNofile() {
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ class CCompositor {
|
||||||
void cleanup();
|
void cleanup();
|
||||||
void bumpNofile();
|
void bumpNofile();
|
||||||
void restoreNofile();
|
void restoreNofile();
|
||||||
void setWatchdogFd(int fd);
|
bool setWatchdogFd(int fd);
|
||||||
|
|
||||||
bool m_readyToProcess = false;
|
bool m_readyToProcess = false;
|
||||||
bool m_sessionActive = true;
|
bool m_sessionActive = true;
|
||||||
|
|
|
||||||
|
|
@ -211,10 +211,16 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
reapZombieChildrenAutomatically();
|
reapZombieChildrenAutomatically();
|
||||||
|
|
||||||
|
bool watchdogOk = watchdogFd > 0;
|
||||||
|
|
||||||
if (watchdogFd > 0)
|
if (watchdogFd > 0)
|
||||||
g_pCompositor->setWatchdogFd(watchdogFd);
|
watchdogOk = g_pCompositor->setWatchdogFd(watchdogFd);
|
||||||
if (safeMode)
|
if (safeMode)
|
||||||
g_pCompositor->m_safeMode = true;
|
g_pCompositor->m_safeMode = true;
|
||||||
|
|
||||||
|
if (!watchdogOk)
|
||||||
|
Debug::log(WARN, "WARNING: Hyprland is being launched without start-hyprland. This is highly advised against.");
|
||||||
|
|
||||||
g_pCompositor->initServer(socketName, socketFd);
|
g_pCompositor->initServer(socketName, socketFd);
|
||||||
|
|
||||||
if (verifyConfig)
|
if (verifyConfig)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue