mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 04:10: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);
|
||||
}
|
||||
|
||||
void CCompositor::setWatchdogFd(int fd) {
|
||||
bool CCompositor::setWatchdogFd(int fd) {
|
||||
m_watchdogWriteFd = Hyprutils::OS::CFileDescriptor{fd};
|
||||
return m_watchdogWriteFd.isValid() && !m_watchdogWriteFd.isClosed();
|
||||
}
|
||||
|
||||
void CCompositor::bumpNofile() {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class CCompositor {
|
|||
void cleanup();
|
||||
void bumpNofile();
|
||||
void restoreNofile();
|
||||
void setWatchdogFd(int fd);
|
||||
bool setWatchdogFd(int fd);
|
||||
|
||||
bool m_readyToProcess = false;
|
||||
bool m_sessionActive = true;
|
||||
|
|
|
|||
|
|
@ -211,10 +211,16 @@ int main(int argc, char** argv) {
|
|||
|
||||
reapZombieChildrenAutomatically();
|
||||
|
||||
bool watchdogOk = watchdogFd > 0;
|
||||
|
||||
if (watchdogFd > 0)
|
||||
g_pCompositor->setWatchdogFd(watchdogFd);
|
||||
watchdogOk = g_pCompositor->setWatchdogFd(watchdogFd);
|
||||
if (safeMode)
|
||||
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);
|
||||
|
||||
if (verifyConfig)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue