mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-08 07:18:05 +02:00
cf
This commit is contained in:
parent
6be13e950a
commit
b9399c2a9d
38 changed files with 226 additions and 222 deletions
|
|
@ -118,7 +118,7 @@ class CCssGapData : public ICustomConfigValueData {
|
|||
break;
|
||||
}
|
||||
default: {
|
||||
Log::logger->log(Log::WARN, "Too many arguments provided for gaps.");
|
||||
Log::logger->log(Log::WARN, "Too many arguments provided for gaps.");
|
||||
*this = CCssGapData(toInt(varlist[0]), toInt(varlist[1]), toInt(varlist[2]), toInt(varlist[3]));
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ static Hyprlang::CParseResult configHandleGradientSet(const char* VALUE, void**
|
|||
try {
|
||||
DATA->m_angle = std::stoi(std::string(var.substr(0, var.find("deg")))) * (PI / 180.0); // radians
|
||||
} catch (...) {
|
||||
Log::logger->log(Log::WARN, "Error parsing gradient {}", V);
|
||||
Log::logger->log(Log::WARN, "Error parsing gradient {}", V);
|
||||
parseError = "Error parsing gradient " + V;
|
||||
}
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ static Hyprlang::CParseResult configHandleGradientSet(const char* VALUE, void**
|
|||
}
|
||||
|
||||
if (DATA->m_colors.size() >= 10) {
|
||||
Log::logger->log(Log::WARN, "Error parsing gradient {}: max colors is 10.", V);
|
||||
Log::logger->log(Log::WARN, "Error parsing gradient {}: max colors is 10.", V);
|
||||
parseError = "Error parsing gradient " + V + ": max colors is 10.";
|
||||
break;
|
||||
}
|
||||
|
|
@ -109,13 +109,13 @@ static Hyprlang::CParseResult configHandleGradientSet(const char* VALUE, void**
|
|||
throw std::runtime_error(std::format("failed to parse {} as a color", var));
|
||||
DATA->m_colors.emplace_back(COL.value());
|
||||
} catch (std::exception& e) {
|
||||
Log::logger->log(Log::WARN, "Error parsing gradient {}", V);
|
||||
Log::logger->log(Log::WARN, "Error parsing gradient {}", V);
|
||||
parseError = "Error parsing gradient " + V + ": " + e.what();
|
||||
}
|
||||
}
|
||||
|
||||
if (DATA->m_colors.empty()) {
|
||||
Log::logger->log(Log::WARN, "Error parsing gradient {}", V);
|
||||
Log::logger->log(Log::WARN, "Error parsing gradient {}", V);
|
||||
if (parseError.empty())
|
||||
parseError = "Error parsing gradient " + V + ": No colors?";
|
||||
|
||||
|
|
@ -880,10 +880,12 @@ CConfigManager::CConfigManager() {
|
|||
resetHLConfig();
|
||||
|
||||
if (CONFIG_OPTIONS.size() != m_configValueNumber - 1 /* autogenerated is special */)
|
||||
Log::logger->log(Log::DEBUG, "Warning: config descriptions have {} entries, but there are {} config values. This should fail tests!!", CONFIG_OPTIONS.size(), m_configValueNumber);
|
||||
Log::logger->log(Log::DEBUG, "Warning: config descriptions have {} entries, but there are {} config values. This should fail tests!!", CONFIG_OPTIONS.size(),
|
||||
m_configValueNumber);
|
||||
|
||||
if (!g_pCompositor->m_onlyConfigVerification) {
|
||||
Log::logger->log(Log::DEBUG,
|
||||
Log::logger->log(
|
||||
Log::DEBUG,
|
||||
"!!!!HEY YOU, YES YOU!!!!: further logs to stdout / logfile are disabled by default. BEFORE SENDING THIS LOG, ENABLE THEM. Use debug:disable_logs = false to do so: "
|
||||
"https://wiki.hypr.land/Configuring/Variables/#debug");
|
||||
}
|
||||
|
|
@ -923,10 +925,10 @@ std::optional<std::string> CConfigManager::generateConfig(std::string configPath
|
|||
return "Config could not be generated.";
|
||||
}
|
||||
if (created)
|
||||
Log::logger->log(Log::WARN, "Creating config home directory");
|
||||
Log::logger->log(Log::WARN, "Creating config home directory");
|
||||
}
|
||||
|
||||
Log::logger->log(Log::WARN, "No config file found; attempting to generate.");
|
||||
Log::logger->log(Log::WARN, "No config file found; attempting to generate.");
|
||||
std::ofstream ofs;
|
||||
ofs.open(configPath, std::ios::trunc);
|
||||
if (!safeMode) {
|
||||
|
|
@ -1516,8 +1518,8 @@ SMonitorRule CConfigManager::getMonitorRuleFor(const PHLMONITOR PMONITOR) {
|
|||
rule.disabled = !CONFIG->enabled;
|
||||
|
||||
if ((CONFIG->committedProperties & OUTPUT_HEAD_COMMITTED_MODE) || (CONFIG->committedProperties & OUTPUT_HEAD_COMMITTED_CUSTOM_MODE)) {
|
||||
Log::logger->log(Log::DEBUG, " > overriding mode: {:.0f}x{:.0f}@{:.2f}Hz -> {:.0f}x{:.0f}@{:.2f}Hz", rule.resolution.x, rule.resolution.y, rule.refreshRate, CONFIG->resolution.x,
|
||||
CONFIG->resolution.y, CONFIG->refresh / 1000.F);
|
||||
Log::logger->log(Log::DEBUG, " > overriding mode: {:.0f}x{:.0f}@{:.2f}Hz -> {:.0f}x{:.0f}@{:.2f}Hz", rule.resolution.x, rule.resolution.y, rule.refreshRate,
|
||||
CONFIG->resolution.x, CONFIG->resolution.y, CONFIG->refresh / 1000.F);
|
||||
rule.resolution = CONFIG->resolution;
|
||||
rule.refreshRate = CONFIG->refresh / 1000.F;
|
||||
}
|
||||
|
|
@ -1551,7 +1553,7 @@ SMonitorRule CConfigManager::getMonitorRuleFor(const PHLMONITOR PMONITOR) {
|
|||
}
|
||||
}
|
||||
|
||||
Log::logger->log(Log::WARN, "No rule found for {}, trying to use the first.", PMONITOR->m_name);
|
||||
Log::logger->log(Log::WARN, "No rule found for {}, trying to use the first.", PMONITOR->m_name);
|
||||
|
||||
for (auto const& r : m_monitorRules) {
|
||||
if (r.name.empty()) {
|
||||
|
|
@ -1559,7 +1561,7 @@ SMonitorRule CConfigManager::getMonitorRuleFor(const PHLMONITOR PMONITOR) {
|
|||
}
|
||||
}
|
||||
|
||||
Log::logger->log(Log::WARN, "No rules configured. Using the default hardcoded one.");
|
||||
Log::logger->log(Log::WARN, "No rules configured. Using the default hardcoded one.");
|
||||
|
||||
return applyWlrOutputConfig(SMonitorRule{.autoDir = eAutoDirs::DIR_AUTO_RIGHT,
|
||||
.name = "",
|
||||
|
|
@ -2100,10 +2102,10 @@ bool CMonitorRuleParser::parsePosition(const std::string& value, bool isFirst) {
|
|||
m_rule.autoDir = eAutoDirs::DIR_AUTO_CENTER_DOWN;
|
||||
else {
|
||||
Log::logger->log(Log::WARN,
|
||||
"Invalid auto direction. Valid options are 'auto',"
|
||||
"'auto-up', 'auto-down', 'auto-left', 'auto-right',"
|
||||
"'auto-center-up', 'auto-center-down',"
|
||||
"'auto-center-left', and 'auto-center-right'.");
|
||||
"Invalid auto direction. Valid options are 'auto',"
|
||||
"'auto-up', 'auto-down', 'auto-left', 'auto-right',"
|
||||
"'auto-center-up', 'auto-center-down',"
|
||||
"'auto-center-left', and 'auto-center-right'.");
|
||||
m_error += "invalid auto direction ";
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2743,10 +2745,10 @@ std::optional<std::string> CConfigManager::handleSource(const std::string& comma
|
|||
if (THISRESULT.error && errorsFromParsing.empty())
|
||||
errorsFromParsing += THISRESULT.getError();
|
||||
} else if (std::filesystem::is_directory(file_status)) {
|
||||
Log::logger->log(Log::WARN, "source= skipping directory {}", value);
|
||||
Log::logger->log(Log::WARN, "source= skipping directory {}", value);
|
||||
continue;
|
||||
} else {
|
||||
Log::logger->log(Log::WARN, "source= skipping non-regular-file {}", value);
|
||||
Log::logger->log(Log::WARN, "source= skipping non-regular-file {}", value);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ bool CLayerRule::matches(PHLLS ls) {
|
|||
for (const auto& [prop, engine] : m_matchEngines) {
|
||||
switch (prop) {
|
||||
default: {
|
||||
Log::logger->log(Log::TRACE, "CLayerRule::matches: skipping prop entry {}", sc<std::underlying_type_t<eRuleProperty>>(prop));
|
||||
Log::logger->log(Log::TRACE, "CLayerRule::matches: skipping prop entry {}", sc<std::underlying_type_t<eRuleProperty>>(prop));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ bool CWindowRule::matches(PHLWINDOW w, bool allowEnvLookup) {
|
|||
for (const auto& [prop, engine] : m_matchEngines) {
|
||||
switch (prop) {
|
||||
default: {
|
||||
Log::logger->log(Log::TRACE, "CWindowRule::matches: skipping prop entry {}", sc<std::underlying_type_t<eRuleProperty>>(prop));
|
||||
Log::logger->log(Log::TRACE, "CWindowRule::matches: skipping prop entry {}", sc<std::underlying_type_t<eRuleProperty>>(prop));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
|
|||
switch (key) {
|
||||
default: {
|
||||
if (key <= WINDOW_RULE_EFFECT_LAST_STATIC) {
|
||||
Log::logger->log(Log::TRACE, "CWindowRuleApplicator::applyDynamicRule: Skipping effect {}, not dynamic", sc<std::underlying_type_t<eWindowRuleEffect>>(key));
|
||||
Log::logger->log(Log::TRACE, "CWindowRuleApplicator::applyDynamicRule: Skipping effect {}, not dynamic", sc<std::underlying_type_t<eWindowRuleEffect>>(key));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -179,9 +179,9 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
|
|||
|
||||
// Includes sanity checks for the number of colors in each gradient
|
||||
if (activeBorderGradient.m_colors.size() > 10 || inactiveBorderGradient.m_colors.size() > 10)
|
||||
Log::logger->log(Log::WARN, "Bordercolor rule \"{}\" has more than 10 colors in one gradient, ignoring", effect);
|
||||
Log::logger->log(Log::WARN, "Bordercolor rule \"{}\" has more than 10 colors in one gradient, ignoring", effect);
|
||||
else if (activeBorderGradient.m_colors.empty())
|
||||
Log::logger->log(Log::WARN, "Bordercolor rule \"{}\" has no colors, ignoring", effect);
|
||||
Log::logger->log(Log::WARN, "Bordercolor rule \"{}\" has no colors, ignoring", effect);
|
||||
else if (inactiveBorderGradient.m_colors.empty())
|
||||
m_activeBorderColor.first = Types::COverridableVar(activeBorderGradient, Types::PRIORITY_WINDOW_RULE);
|
||||
else {
|
||||
|
|
@ -451,7 +451,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyStaticRule(const
|
|||
for (const auto& [key, effect] : rule->effects()) {
|
||||
switch (key) {
|
||||
default: {
|
||||
Log::logger->log(Log::TRACE, "CWindowRuleApplicator::applyStaticRule: Skipping effect {}, not static", sc<std::underlying_type_t<eWindowRuleEffect>>(key));
|
||||
Log::logger->log(Log::TRACE, "CWindowRuleApplicator::applyStaticRule: Skipping effect {}, not static", sc<std::underlying_type_t<eWindowRuleEffect>>(key));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ void CFocusState::addWindowToHistory(PHLWINDOW w) {
|
|||
void CFocusState::moveWindowToLatestInHistory(PHLWINDOW w) {
|
||||
const auto HISTORYPIVOT = std::ranges::find_if(m_windowFocusHistory, [&w](const auto& other) { return other.lock() == w; });
|
||||
if (HISTORYPIVOT == m_windowFocusHistory.end())
|
||||
Log::logger->log(Log::TRACE, "CFocusState: {} has no pivot in history, ignoring request to move to latest", w);
|
||||
Log::logger->log(Log::TRACE, "CFocusState: {} has no pivot in history, ignoring request to move to latest", w);
|
||||
else
|
||||
std::rotate(m_windowFocusHistory.begin(), HISTORYPIVOT, HISTORYPIVOT + 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ PHLLS CLayerSurface::create(SP<CLayerShellResource> resource) {
|
|||
|
||||
pLS->m_alpha->setValueAndWarp(0.f);
|
||||
|
||||
Log::logger->log(Log::DEBUG, "LayerSurface {:x} (namespace {} layer {}) created on monitor {}", rc<uintptr_t>(resource.get()), resource->m_layerNamespace, sc<int>(pLS->m_layer),
|
||||
pMonitor->m_name);
|
||||
Log::logger->log(Log::DEBUG, "LayerSurface {:x} (namespace {} layer {}) created on monitor {}", rc<uintptr_t>(resource.get()), resource->m_layerNamespace,
|
||||
sc<int>(pLS->m_layer), pMonitor->m_name);
|
||||
|
||||
return pLS;
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ void CLayerSurface::onDestroy() {
|
|||
const auto PMONITOR = m_monitor.lock();
|
||||
|
||||
if (!PMONITOR)
|
||||
Log::logger->log(Log::WARN, "Layersurface destroyed on an invalid monitor (removed?)");
|
||||
Log::logger->log(Log::WARN, "Layersurface destroyed on an invalid monitor (removed?)");
|
||||
|
||||
if (!m_fadingOut) {
|
||||
if (m_mapped) {
|
||||
|
|
@ -237,7 +237,7 @@ void CLayerSurface::onUnmap() {
|
|||
std::erase_if(g_pInputManager->m_exclusiveLSes, [this](const auto& other) { return !other || other == m_self; });
|
||||
|
||||
if (!m_monitor || g_pCompositor->m_unsafeState) {
|
||||
Log::logger->log(Log::WARN, "Layersurface unmapping on invalid monitor (removed?) ignoring.");
|
||||
Log::logger->log(Log::WARN, "Layersurface unmapping on invalid monitor (removed?) ignoring.");
|
||||
|
||||
g_pCompositor->addToFadingOutSafe(m_self.lock());
|
||||
|
||||
|
|
|
|||
|
|
@ -1649,8 +1649,8 @@ void CWindow::updateX11SurfaceScale() {
|
|||
void CWindow::sendWindowSize(bool force) {
|
||||
const auto PMONITOR = m_monitor.lock();
|
||||
|
||||
Log::logger->log(Log::TRACE, "sendWindowSize: window:{:x},title:{} with real pos {}, real size {} (force: {})", rc<uintptr_t>(this), this->m_title, m_realPosition->goal(),
|
||||
m_realSize->goal(), force);
|
||||
Log::logger->log(Log::TRACE, "sendWindowSize: window:{:x},title:{} with real pos {}, real size {} (force: {})", rc<uintptr_t>(this), this->m_title, m_realPosition->goal(),
|
||||
m_realSize->goal(), force);
|
||||
|
||||
// TODO: this should be decoupled from setWindowSize IMO
|
||||
const auto REPORTPOS = realToReportPosition();
|
||||
|
|
@ -1682,7 +1682,7 @@ void CWindow::setContentType(NContentType::eContentType contentType) {
|
|||
m_wlSurface->resource()->m_contentType = PROTO::contentType->getContentType(m_wlSurface->resource());
|
||||
// else disallow content type change if proto is used?
|
||||
|
||||
Log::logger->log(Log::INFO, "ContentType for window {}", sc<int>(contentType));
|
||||
Log::logger->log(Log::INFO, "ContentType for window {}", sc<int>(contentType));
|
||||
m_wlSurface->resource()->m_contentType->m_value = contentType;
|
||||
}
|
||||
|
||||
|
|
@ -2406,7 +2406,7 @@ void CWindow::unmapWindow() {
|
|||
const auto CURRENTFSMODE = m_fullscreenState.internal;
|
||||
|
||||
if (!wlSurface()->exists() || !m_isMapped) {
|
||||
Log::logger->log(Log::WARN, "{} unmapped without being mapped??", m_self.lock());
|
||||
Log::logger->log(Log::WARN, "{} unmapped without being mapped??", m_self.lock());
|
||||
m_fadingOut = false;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ void IKeyboard::setKeymap(const SStringRuleNames& rules) {
|
|||
|
||||
clearManuallyAllocd();
|
||||
|
||||
Log::logger->log(Log::DEBUG, "Attempting to create a keymap for layout {} with variant {} (rules: {}, model: {}, options: {})", rules.layout, rules.variant, rules.rules, rules.model,
|
||||
rules.options);
|
||||
Log::logger->log(Log::DEBUG, "Attempting to create a keymap for layout {} with variant {} (rules: {}, model: {}, options: {})", rules.layout, rules.variant, rules.rules,
|
||||
rules.model, rules.options);
|
||||
|
||||
if (!m_xkbFilePath.empty()) {
|
||||
auto path = absolutePath(m_xkbFilePath, g_pConfigManager->m_configCurrentPath);
|
||||
|
|
@ -99,8 +99,8 @@ void IKeyboard::setKeymap(const SStringRuleNames& rules) {
|
|||
g_pConfigManager->addParseError("Invalid keyboard layout passed. ( rules: " + rules.rules + ", model: " + rules.model + ", variant: " + rules.variant +
|
||||
", options: " + rules.options + ", layout: " + rules.layout + " )");
|
||||
|
||||
Log::logger->log(Log::ERR, "Keyboard layout {} with variant {} (rules: {}, model: {}, options: {}) couldn't have been loaded.", rules.layout, rules.variant, rules.rules, rules.model,
|
||||
rules.options);
|
||||
Log::logger->log(Log::ERR, "Keyboard layout {} with variant {} (rules: {}, model: {}, options: {}) couldn't have been loaded.", rules.layout, rules.variant, rules.rules,
|
||||
rules.model, rules.options);
|
||||
memset(&XKBRULES, 0, sizeof(XKBRULES));
|
||||
|
||||
m_currentRules.rules = "";
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ void logSystemInfo() {
|
|||
Log::logger->log(Log::DEBUG, "Release: {}", std::string{unameInfo.release});
|
||||
Log::logger->log(Log::DEBUG, "Version: {}", std::string{unameInfo.version});
|
||||
|
||||
Log::logger->log(Log::DEBUG, "\n");
|
||||
Log::logger->log(Log::DEBUG, "\n");
|
||||
|
||||
#if defined(__DragonFly__) || defined(__FreeBSD__)
|
||||
const std::string GPUINFO = execAndGet("pciconf -lv | grep -F -A4 vga");
|
||||
|
|
@ -558,13 +558,13 @@ void logSystemInfo() {
|
|||
Log::logger->log(Log::DEBUG, "GPU information:\n{}\n", GPUINFO);
|
||||
|
||||
if (GPUINFO.contains("NVIDIA")) {
|
||||
Log::logger->log(Log::WARN, "Warning: you're using an NVIDIA GPU. Make sure you follow the instructions on the wiki if anything is amiss.\n");
|
||||
Log::logger->log(Log::WARN, "Warning: you're using an NVIDIA GPU. Make sure you follow the instructions on the wiki if anything is amiss.\n");
|
||||
}
|
||||
|
||||
// log etc
|
||||
Log::logger->log(Log::DEBUG, "os-release:");
|
||||
|
||||
Log::logger->log(Log::DEBUG, "{}", NFsUtils::readFileAsString("/etc/os-release").value_or("error"));
|
||||
Log::logger->log(Log::DEBUG, "{}", NFsUtils::readFileAsString("/etc/os-release").value_or("error"));
|
||||
}
|
||||
|
||||
int64_t getPPIDof(int64_t pid) {
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ void CMonitor::onConnect(bool noRule) {
|
|||
applyMonitorRule(&monitorRule, true);
|
||||
|
||||
if (!m_state.commit())
|
||||
Log::logger->log(Log::WARN, "state.commit() failed in CMonitor::onCommit");
|
||||
Log::logger->log(Log::WARN, "state.commit() failed in CMonitor::onCommit");
|
||||
|
||||
m_damage.setSize(m_transformedSize);
|
||||
|
||||
|
|
@ -415,7 +415,7 @@ void CMonitor::onDisconnect(bool destroy) {
|
|||
Log::logger->log(Log::DEBUG, "Removed monitor {}!", m_name);
|
||||
|
||||
if (!BACKUPMON) {
|
||||
Log::logger->log(Log::WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend.");
|
||||
Log::logger->log(Log::WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend.");
|
||||
g_pCompositor->enterUnsafeState();
|
||||
}
|
||||
|
||||
|
|
@ -453,7 +453,7 @@ void CMonitor::onDisconnect(bool destroy) {
|
|||
m_output->state->setEnabled(false);
|
||||
|
||||
if (!m_state.commit())
|
||||
Log::logger->log(Log::WARN, "state.commit() failed in CMonitor::onDisconnect");
|
||||
Log::logger->log(Log::WARN, "state.commit() failed in CMonitor::onDisconnect");
|
||||
|
||||
if (Desktop::focusState()->monitor() == m_self)
|
||||
Desktop::focusState()->rawMonitorFocus(BACKUPMON ? BACKUPMON : g_pCompositor->m_unsafeOutput.lock());
|
||||
|
|
@ -738,12 +738,12 @@ bool CMonitor::applyMonitorRule(SMonitorRule* pMonitorRule, bool force) {
|
|||
m_output->state->resetExplicitFences();
|
||||
|
||||
if (Env::isTrace()) {
|
||||
Log::logger->log(Log::TRACE, "Monitor {} requested modes:", m_name);
|
||||
Log::logger->log(Log::TRACE, "Monitor {} requested modes:", m_name);
|
||||
if (requestedModes.empty())
|
||||
Log::logger->log(Log::TRACE, "| None");
|
||||
Log::logger->log(Log::TRACE, "| None");
|
||||
else {
|
||||
for (auto const& mode : requestedModes | std::views::reverse) {
|
||||
Log::logger->log(Log::TRACE, "| {:X0}@{:.2f}Hz", mode->pixelSize, mode->refreshRate / 1000.f);
|
||||
Log::logger->log(Log::TRACE, "| {:X0}@{:.2f}Hz", mode->pixelSize, mode->refreshRate / 1000.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -820,7 +820,7 @@ bool CMonitor::applyMonitorRule(SMonitorRule* pMonitorRule, bool force) {
|
|||
|
||||
auto errorMessage = I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_MONITOR_MODE_FAIL,
|
||||
{{"name", m_name}, {"mode", std::format("{:X0}@{:.2f}Hz", mode->pixelSize, mode->refreshRate / 1000.f)}});
|
||||
Log::logger->log(Log::WARN, errorMessage);
|
||||
Log::logger->log(Log::WARN, errorMessage);
|
||||
g_pHyprNotificationOverlay->addNotification(errorMessage, CHyprColor(0xff0000ff), 5000, ICON_WARNING);
|
||||
|
||||
m_refreshRate = mode->refreshRate / 1000.f;
|
||||
|
|
@ -994,8 +994,8 @@ bool CMonitor::applyMonitorRule(SMonitorRule* pMonitorRule, bool force) {
|
|||
// reload to fix mirrors
|
||||
g_pConfigManager->m_wantsMonitorReload = true;
|
||||
|
||||
Log::logger->log(Log::DEBUG, "Monitor {} data dump: res {:X}@{:.2f}Hz, scale {:.2f}, transform {}, pos {:X}, 10b {}", m_name, m_pixelSize, m_refreshRate, m_scale, sc<int>(m_transform),
|
||||
m_position, sc<int>(m_enabled10bit));
|
||||
Log::logger->log(Log::DEBUG, "Monitor {} data dump: res {:X}@{:.2f}Hz, scale {:.2f}, transform {}, pos {:X}, 10b {}", m_name, m_pixelSize, m_refreshRate, m_scale,
|
||||
sc<int>(m_transform), m_position, sc<int>(m_enabled10bit));
|
||||
|
||||
EMIT_HOOK_EVENT("monitorLayoutChanged", nullptr);
|
||||
|
||||
|
|
@ -1693,7 +1693,7 @@ uint8_t CMonitor::isTearingBlocked(bool full) {
|
|||
if (!*PTEARINGENABLED) {
|
||||
reasons |= TC_USER;
|
||||
if (!full) {
|
||||
Log::logger->log(Log::WARN, "Tearing commit requested but the master switch general:allow_tearing is off, ignoring");
|
||||
Log::logger->log(Log::WARN, "Tearing commit requested but the master switch general:allow_tearing is off, ignoring");
|
||||
return reasons;
|
||||
}
|
||||
}
|
||||
|
|
@ -1701,7 +1701,7 @@ uint8_t CMonitor::isTearingBlocked(bool full) {
|
|||
if (g_pHyprOpenGL->m_renderData.mouseZoomFactor != 1.0) {
|
||||
reasons |= TC_ZOOM;
|
||||
if (!full) {
|
||||
Log::logger->log(Log::WARN, "Tearing commit requested but scale factor is not 1, ignoring");
|
||||
Log::logger->log(Log::WARN, "Tearing commit requested but scale factor is not 1, ignoring");
|
||||
return reasons;
|
||||
}
|
||||
}
|
||||
|
|
@ -1709,7 +1709,7 @@ uint8_t CMonitor::isTearingBlocked(bool full) {
|
|||
if (!m_tearingState.canTear) {
|
||||
reasons |= TC_SUPPORT;
|
||||
if (!full) {
|
||||
Log::logger->log(Log::WARN, "Tearing commit requested but monitor doesn't support it, ignoring");
|
||||
Log::logger->log(Log::WARN, "Tearing commit requested but monitor doesn't support it, ignoring");
|
||||
return reasons;
|
||||
}
|
||||
}
|
||||
|
|
@ -1821,8 +1821,8 @@ bool CMonitor::attemptDirectScanout() {
|
|||
const auto PSURFACE = PCANDIDATE->getSolitaryResource();
|
||||
const auto params = PSURFACE->m_current.buffer->dmabuf();
|
||||
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: surface {:x} passed, will attempt, buffer {} fmt: {} -> {} (mod {})", rc<uintptr_t>(PSURFACE.get()),
|
||||
rc<uintptr_t>(PSURFACE->m_current.buffer.m_buffer.get()), m_drmFormat, params.format, params.modifier);
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: surface {:x} passed, will attempt, buffer {} fmt: {} -> {} (mod {})", rc<uintptr_t>(PSURFACE.get()),
|
||||
rc<uintptr_t>(PSURFACE->m_current.buffer.m_buffer.get()), m_drmFormat, params.format, params.modifier);
|
||||
|
||||
auto PBUFFER = PSURFACE->m_current.buffer.m_buffer;
|
||||
|
||||
|
|
@ -1832,12 +1832,12 @@ bool CMonitor::attemptDirectScanout() {
|
|||
|
||||
if (m_scanoutNeedsCursorUpdate) {
|
||||
if (!m_state.test()) {
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: failed basic test on cursor update");
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: failed basic test on cursor update");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_output->commit()) {
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: failed to commit cursor update");
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: failed to commit cursor update");
|
||||
m_lastScanout.reset();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1865,12 +1865,12 @@ bool CMonitor::attemptDirectScanout() {
|
|||
}
|
||||
|
||||
m_output->state->setBuffer(PBUFFER);
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: setting presentation mode");
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: setting presentation mode");
|
||||
m_output->state->setPresentationMode(m_tearingState.activelyTearing ? Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_IMMEDIATE :
|
||||
Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_VSYNC);
|
||||
|
||||
if (!m_state.test()) {
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: failed basic test");
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: failed basic test");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1884,7 +1884,7 @@ bool CMonitor::attemptDirectScanout() {
|
|||
bool ok = m_output->commit();
|
||||
|
||||
if (!ok) {
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: failed to scanout surface");
|
||||
Log::logger->log(Log::TRACE, "attemptDirectScanout: failed to scanout surface");
|
||||
m_lastScanout.reset();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1978,8 +1978,8 @@ void CMonitor::commitDPMSState(bool state) {
|
|||
}
|
||||
|
||||
void CMonitor::debugLastPresentation(const std::string& message) {
|
||||
Log::logger->log(Log::TRACE, "{} (last presentation {} - {} fps)", message, m_lastPresentationTimer.getMillis(),
|
||||
m_lastPresentationTimer.getMillis() > 0 ? 1000.0f / m_lastPresentationTimer.getMillis() : 0.0f);
|
||||
Log::logger->log(Log::TRACE, "{} (last presentation {} - {} fps)", message, m_lastPresentationTimer.getMillis(),
|
||||
m_lastPresentationTimer.getMillis() > 0 ? 1000.0f / m_lastPresentationTimer.getMillis() : 0.0f);
|
||||
}
|
||||
|
||||
void CMonitor::onCursorMovedOnMonitor() {
|
||||
|
|
@ -2094,7 +2094,7 @@ CMonitorState::CMonitorState(CMonitor* owner) : m_owner(owner) {
|
|||
void CMonitorState::ensureBufferPresent() {
|
||||
const auto STATE = m_owner->m_output->state->state();
|
||||
if (!STATE.enabled) {
|
||||
Log::logger->log(Log::TRACE, "CMonitorState::ensureBufferPresent: Ignoring, monitor is not enabled");
|
||||
Log::logger->log(Log::TRACE, "CMonitorState::ensureBufferPresent: Ignoring, monitor is not enabled");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2136,7 +2136,7 @@ bool CMonitorState::updateSwapchain() {
|
|||
const auto& STATE = m_owner->m_output->state->state();
|
||||
const auto& MODE = STATE.mode ? STATE.mode : STATE.customMode;
|
||||
if (!MODE) {
|
||||
Log::logger->log(Log::WARN, "updateSwapchain: No mode?");
|
||||
Log::logger->log(Log::WARN, "updateSwapchain: No mode?");
|
||||
return true;
|
||||
}
|
||||
options.format = m_owner->m_drmFormat;
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ void CMonitorFrameScheduler::onSyncFired() {
|
|||
|
||||
if (std::chrono::duration_cast<std::chrono::microseconds>(hrc::now() - m_lastRenderBegun).count() / 1000.F < 1000.F / m_monitor->m_refreshRate) {
|
||||
// we are in. Frame is valid. We can just render as normal.
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> onSyncFired, didn't miss.", m_monitor->m_name);
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> onSyncFired, didn't miss.", m_monitor->m_name);
|
||||
m_renderAtFrame = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> onSyncFired, missed.", m_monitor->m_name);
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> onSyncFired, missed.", m_monitor->m_name);
|
||||
|
||||
// we are out. The frame is taking too long to render. Begin rendering immediately, but don't commit yet.
|
||||
m_pendingThird = true;
|
||||
|
|
@ -56,11 +56,11 @@ void CMonitorFrameScheduler::onPresented() {
|
|||
if (!m_pendingThird)
|
||||
return;
|
||||
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> onPresented, missed, committing pending.", m_monitor->m_name);
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> onPresented, missed, committing pending.", m_monitor->m_name);
|
||||
|
||||
m_pendingThird = false;
|
||||
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> onPresented, missed, committing pending at the earliest convenience.", m_monitor->m_name);
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> onPresented, missed, committing pending at the earliest convenience.", m_monitor->m_name);
|
||||
|
||||
m_pendingThird = false;
|
||||
|
||||
|
|
@ -101,11 +101,11 @@ void CMonitorFrameScheduler::onFrame() {
|
|||
}
|
||||
|
||||
if (!m_renderAtFrame) {
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> frame event, but m_renderAtFrame = false.", m_monitor->m_name);
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> frame event, but m_renderAtFrame = false.", m_monitor->m_name);
|
||||
return;
|
||||
}
|
||||
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> frame event, render = true, rendering normally.", m_monitor->m_name);
|
||||
Log::logger->log(Log::TRACE, "CMonitorFrameScheduler: {} -> frame event, render = true, rendering normally.", m_monitor->m_name);
|
||||
|
||||
m_lastRenderBegun = hrc::now();
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ void CMonitorFrameScheduler::onFinishRender() {
|
|||
|
||||
bool CMonitorFrameScheduler::canRender() {
|
||||
if ((g_pCompositor->m_aqBackend->hasSession() && !g_pCompositor->m_aqBackend->session->active) || !g_pCompositor->m_sessionActive || g_pCompositor->m_unsafeState) {
|
||||
Log::logger->log(Log::WARN, "Attempted to render frame on inactive session!");
|
||||
Log::logger->log(Log::WARN, "Attempted to render frame on inactive session!");
|
||||
|
||||
if (g_pCompositor->m_unsafeState && std::ranges::any_of(g_pCompositor->m_monitors.begin(), g_pCompositor->m_monitors.end(), [&](auto& m) {
|
||||
return m->m_output != g_pCompositor->m_unsafeOutput->m_output;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ std::optional<std::string> NFsUtils::getDataHome() {
|
|||
}
|
||||
std::filesystem::permissions(dataRoot, std::filesystem::perms::owner_read | std::filesystem::perms::owner_write | std::filesystem::perms::owner_exec, ec);
|
||||
if (ec)
|
||||
Log::logger->log(Log::WARN, "FsUtils::getDataHome: couldn't set perms on hyprland data store. Proceeding anyways.");
|
||||
Log::logger->log(Log::WARN, "FsUtils::getDataHome: couldn't set perms on hyprland data store. Proceeding anyways.");
|
||||
}
|
||||
|
||||
if (!std::filesystem::exists(dataRoot, ec) || ec) {
|
||||
|
|
|
|||
|
|
@ -10,20 +10,20 @@ void NInit::gainRealTime() {
|
|||
struct sched_param param;
|
||||
|
||||
if (pthread_getschedparam(pthread_self(), &old_policy, ¶m)) {
|
||||
Log::logger->log(Log::WARN, "Failed to get old pthread scheduling priority");
|
||||
Log::logger->log(Log::WARN, "Failed to get old pthread scheduling priority");
|
||||
return;
|
||||
}
|
||||
|
||||
param.sched_priority = minPrio;
|
||||
|
||||
if (pthread_setschedparam(pthread_self(), SCHED_RR, ¶m)) {
|
||||
Log::logger->log(Log::WARN, "Failed to change process scheduling strategy");
|
||||
Log::logger->log(Log::WARN, "Failed to change process scheduling strategy");
|
||||
return;
|
||||
}
|
||||
|
||||
pthread_atfork(nullptr, nullptr, []() {
|
||||
const struct sched_param param = {.sched_priority = 0};
|
||||
if (pthread_setschedparam(pthread_self(), SCHED_OTHER, ¶m))
|
||||
Log::logger->log(Log::WARN, "Failed to reset process scheduling strategy");
|
||||
Log::logger->log(Log::WARN, "Failed to reset process scheduling strategy");
|
||||
});
|
||||
}
|
||||
|
|
@ -45,9 +45,9 @@
|
|||
|
||||
#define RASSERT(expr, reason, ...) \
|
||||
if (!(expr)) { \
|
||||
Log::logger->log(Log::CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n{}\n\nat: line {} in {}", \
|
||||
std::format(reason, ##__VA_ARGS__), __LINE__, \
|
||||
([]() constexpr -> std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })()); \
|
||||
Log::logger->log(Log::CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n{}\n\nat: line {} in {}", \
|
||||
std::format(reason, ##__VA_ARGS__), __LINE__, \
|
||||
([]() constexpr -> std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })()); \
|
||||
std::print("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info."); \
|
||||
raise(SIGABRT); \
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
#if ISDEBUG
|
||||
#define UNREACHABLE() \
|
||||
{ \
|
||||
Log::logger->log(Log::CRIT, "\n\nMEMORY CORRUPTED: Unreachable failed! (Reached an unreachable position, memory corruption!!!)"); \
|
||||
Log::logger->log(Log::CRIT, "\n\nMEMORY CORRUPTED: Unreachable failed! (Reached an unreachable position, memory corruption!!!)"); \
|
||||
raise(SIGABRT); \
|
||||
std::unreachable(); \
|
||||
}
|
||||
|
|
@ -98,8 +98,8 @@
|
|||
__CALL__; \
|
||||
auto err = glGetError(); \
|
||||
if (err != GL_NO_ERROR) { \
|
||||
Log::logger->log(Log::ERR, "[GLES] Error in call at {}@{}: 0x{:x}", __LINE__, \
|
||||
([]() constexpr -> std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })(), err); \
|
||||
Log::logger->log(Log::ERR, "[GLES] Error in call at {}@{}: 0x{:x}", __LINE__, \
|
||||
([]() constexpr -> std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })(), err); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ static void hcLogger(enum eHyprcursorLogLevel level, char* message) {
|
|||
if (level == HC_LOG_TRACE)
|
||||
return;
|
||||
|
||||
Log::logger->log(Log::DEBUG, "[hc] {}", message);
|
||||
Log::logger->log(Log::DEBUG, "[hc] {}", message);
|
||||
}
|
||||
|
||||
CCursorBuffer::CCursorBuffer(cairo_surface_t* surf, const Vector2D& size_, const Vector2D& hot_) : m_hotspot(hot_), m_stride(cairo_image_surface_get_stride(surf)) {
|
||||
|
|
@ -83,7 +83,7 @@ CCursorManager::CCursorManager() {
|
|||
}
|
||||
|
||||
if (m_size <= 0) {
|
||||
Log::logger->log(Log::WARN, "HYPRCURSOR_SIZE size not set, defaulting to size 24");
|
||||
Log::logger->log(Log::WARN, "HYPRCURSOR_SIZE size not set, defaulting to size 24");
|
||||
m_size = 24;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -97,7 +97,7 @@ CCursorManager::CCursorManager() {
|
|||
}
|
||||
|
||||
if (m_size <= 0) {
|
||||
Log::logger->log(Log::WARN, "XCURSOR_SIZE size not set, defaulting to size 24");
|
||||
Log::logger->log(Log::WARN, "XCURSOR_SIZE size not set, defaulting to size 24");
|
||||
m_size = 24;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ std::string CEventManager::formatEvent(const SHyprIPCEvent& event) const {
|
|||
|
||||
void CEventManager::postEvent(const SHyprIPCEvent& event) {
|
||||
if (g_pCompositor->m_isShuttingDown) {
|
||||
Log::logger->log(Log::WARN, "Suppressed (shutting down) event of type {}, content: {}", event.event, event.data);
|
||||
Log::logger->log(Log::WARN, "Suppressed (shutting down) event of type {}, content: {}", event.event, event.data);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -307,8 +307,8 @@ void CKeybindManager::updateXKBTranslationState() {
|
|||
", layout: " + LAYOUT + " )",
|
||||
CHyprColor(1.0, 50.0 / 255.0, 50.0 / 255.0, 1.0));
|
||||
|
||||
Log::logger->log(Log::ERR, "[XKBTranslationState] Keyboard layout {} with variant {} (rules: {}, model: {}, options: {}) couldn't have been loaded.", rules.layout, rules.variant,
|
||||
rules.rules, rules.model, rules.options);
|
||||
Log::logger->log(Log::ERR, "[XKBTranslationState] Keyboard layout {} with variant {} (rules: {}, model: {}, options: {}) couldn't have been loaded.", rules.layout,
|
||||
rules.variant, rules.rules, rules.model, rules.options);
|
||||
memset(&rules, 0, sizeof(rules));
|
||||
|
||||
PKEYMAP = xkb_keymap_new_from_names2(PCONTEXT, &rules, XKB_KEYMAP_FORMAT_TEXT_V2, XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ void CPointerManager::resetCursorImage(bool apply) {
|
|||
|
||||
for (auto const& ms : m_monitorStates) {
|
||||
if (!ms->monitor || !ms->monitor->m_enabled || !ms->monitor->m_dpmsStatus) {
|
||||
Log::logger->log(Log::TRACE, "Not updating hw cursors: disabled / dpms off display");
|
||||
Log::logger->log(Log::TRACE, "Not updating hw cursors: disabled / dpms off display");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -260,7 +260,7 @@ void CPointerManager::updateCursorBackend() {
|
|||
|
||||
for (auto const& m : g_pCompositor->m_monitors) {
|
||||
if (!m->m_enabled || !m->m_dpmsStatus) {
|
||||
Log::logger->log(Log::TRACE, "Not updating hw cursors: disabled / dpms off display");
|
||||
Log::logger->log(Log::TRACE, "Not updating hw cursors: disabled / dpms off display");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ void CPointerManager::updateCursorBackend() {
|
|||
}
|
||||
|
||||
if (state->softwareLocks > 0 || g_pConfigManager->shouldUseSoftwareCursors(m) || !attemptHardwareCursor(state)) {
|
||||
Log::logger->log(Log::TRACE, "Output {} rejected hardware cursors, falling back to sw", m->m_name);
|
||||
Log::logger->log(Log::TRACE, "Output {} rejected hardware cursors, falling back to sw", m->m_name);
|
||||
state->box = getCursorBoxLogicalForMonitor(state->monitor.lock());
|
||||
state->hardwareFailed = true;
|
||||
|
||||
|
|
@ -305,11 +305,11 @@ void CPointerManager::onCursorMoved() {
|
|||
auto CROSSES = !m->logicalBox().intersection(CURSORBOX).empty();
|
||||
|
||||
if (!CROSSES && state->cursorFrontBuffer) {
|
||||
Log::logger->log(Log::TRACE, "onCursorMoved for output {}: cursor left the viewport, removing it from the backend", m->m_name);
|
||||
Log::logger->log(Log::TRACE, "onCursorMoved for output {}: cursor left the viewport, removing it from the backend", m->m_name);
|
||||
setHWCursorBuffer(state, nullptr);
|
||||
continue;
|
||||
} else if (CROSSES && !state->cursorFrontBuffer) {
|
||||
Log::logger->log(Log::TRACE, "onCursorMoved for output {}: cursor entered the output, but no front buffer, forcing recalc", m->m_name);
|
||||
Log::logger->log(Log::TRACE, "onCursorMoved for output {}: cursor entered the output, but no front buffer, forcing recalc", m->m_name);
|
||||
recalc = true;
|
||||
}
|
||||
|
||||
|
|
@ -343,7 +343,7 @@ bool CPointerManager::attemptHardwareCursor(SP<CPointerManager::SMonitorPointerS
|
|||
auto texture = getCurrentCursorTexture();
|
||||
|
||||
if (!texture) {
|
||||
Log::logger->log(Log::TRACE, "[pointer] no texture for hw cursor -> hiding");
|
||||
Log::logger->log(Log::TRACE, "[pointer] no texture for hw cursor -> hiding");
|
||||
setHWCursorBuffer(state, nullptr);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -351,7 +351,7 @@ bool CPointerManager::attemptHardwareCursor(SP<CPointerManager::SMonitorPointerS
|
|||
auto buffer = renderHWCursorBuffer(state, texture);
|
||||
|
||||
if (!buffer) {
|
||||
Log::logger->log(Log::TRACE, "[pointer] hw cursor failed rendering");
|
||||
Log::logger->log(Log::TRACE, "[pointer] hw cursor failed rendering");
|
||||
setHWCursorBuffer(state, nullptr);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -359,7 +359,7 @@ bool CPointerManager::attemptHardwareCursor(SP<CPointerManager::SMonitorPointerS
|
|||
bool success = setHWCursorBuffer(state, buffer);
|
||||
|
||||
if (!success) {
|
||||
Log::logger->log(Log::TRACE, "[pointer] hw cursor failed applying, hiding");
|
||||
Log::logger->log(Log::TRACE, "[pointer] hw cursor failed applying, hiding");
|
||||
setHWCursorBuffer(state, nullptr);
|
||||
return false;
|
||||
} else
|
||||
|
|
@ -374,7 +374,7 @@ bool CPointerManager::setHWCursorBuffer(SP<SMonitorPointerState> state, SP<Aquam
|
|||
|
||||
const auto HOTSPOT = transformedHotspot(state->monitor.lock());
|
||||
|
||||
Log::logger->log(Log::TRACE, "[pointer] hw transformed hotspot for {}: {}", state->monitor->m_name, HOTSPOT);
|
||||
Log::logger->log(Log::TRACE, "[pointer] hw transformed hotspot for {}: {}", state->monitor->m_name, HOTSPOT);
|
||||
|
||||
if (!state->monitor->m_output->setCursor(buf, HOTSPOT))
|
||||
return false;
|
||||
|
|
@ -402,7 +402,7 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
|
|||
|
||||
if (maxSize != Vector2D{-1, -1}) {
|
||||
if (cursorSize.x > maxSize.x || cursorSize.y > maxSize.y) {
|
||||
Log::logger->log(Log::TRACE, "hardware cursor too big! {} > {}", m_currentCursorImage.size, maxSize);
|
||||
Log::logger->log(Log::TRACE, "hardware cursor too big! {} > {}", m_currentCursorImage.size, maxSize);
|
||||
return nullptr;
|
||||
}
|
||||
} else
|
||||
|
|
@ -440,7 +440,7 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
|
|||
options.format = DRM_FORMAT_ARGB8888;
|
||||
|
||||
if (!state->monitor->m_cursorSwapchain->reconfigure(options)) {
|
||||
Log::logger->log(Log::TRACE, "Failed to reconfigure cursor swapchain");
|
||||
Log::logger->log(Log::TRACE, "Failed to reconfigure cursor swapchain");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
|
@ -455,7 +455,7 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
|
|||
|
||||
auto buf = state->monitor->m_cursorSwapchain->next(nullptr);
|
||||
if (!buf) {
|
||||
Log::logger->log(Log::TRACE, "Failed to acquire a buffer from the cursor swapchain");
|
||||
Log::logger->log(Log::TRACE, "Failed to acquire a buffer from the cursor swapchain");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
@ -470,12 +470,12 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
|
|||
bool flipRB = false;
|
||||
|
||||
if (SURFACE->m_current.texture) {
|
||||
Log::logger->log(Log::TRACE, "Cursor CPU surface: format {}, expecting AR24", NFormatUtils::drmFormatName(SURFACE->m_current.texture->m_drmFormat));
|
||||
Log::logger->log(Log::TRACE, "Cursor CPU surface: format {}, expecting AR24", NFormatUtils::drmFormatName(SURFACE->m_current.texture->m_drmFormat));
|
||||
if (SURFACE->m_current.texture->m_drmFormat == DRM_FORMAT_ABGR8888) {
|
||||
Log::logger->log(Log::TRACE, "Cursor CPU surface format AB24, will flip. WARNING: this will break on big endian!");
|
||||
Log::logger->log(Log::TRACE, "Cursor CPU surface format AB24, will flip. WARNING: this will break on big endian!");
|
||||
flipRB = true;
|
||||
} else if (SURFACE->m_current.texture->m_drmFormat != DRM_FORMAT_ARGB8888) {
|
||||
Log::logger->log(Log::TRACE, "Cursor CPU surface format rejected, falling back to sw");
|
||||
Log::logger->log(Log::TRACE, "Cursor CPU surface format rejected, falling back to sw");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
|
@ -493,7 +493,7 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
|
|||
}
|
||||
}
|
||||
} else {
|
||||
Log::logger->log(Log::TRACE, "Cannot use dumb copy on dmabuf cursor buffers");
|
||||
Log::logger->log(Log::TRACE, "Cannot use dumb copy on dmabuf cursor buffers");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
|
@ -566,7 +566,7 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
|
|||
|
||||
auto RBO = g_pHyprRenderer->getOrCreateRenderbuffer(buf, state->monitor->m_cursorSwapchain->currentOptions().format);
|
||||
if (!RBO) {
|
||||
Log::logger->log(Log::TRACE, "Failed to create cursor RB with format {}, mod {}", buf->dmabuf().format, buf->dmabuf().modifier);
|
||||
Log::logger->log(Log::TRACE, "Failed to create cursor RB with format {}, mod {}", buf->dmabuf().format, buf->dmabuf().modifier);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
@ -576,8 +576,8 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
|
|||
g_pHyprOpenGL->clear(CHyprColor{0.F, 0.F, 0.F, 0.F});
|
||||
|
||||
CBox xbox = {{}, Vector2D{m_currentCursorImage.size / m_currentCursorImage.scale * state->monitor->m_scale}.round()};
|
||||
Log::logger->log(Log::TRACE, "[pointer] monitor: {}, size: {}, hw buf: {}, scale: {:.2f}, monscale: {:.2f}, xbox: {}", state->monitor->m_name, m_currentCursorImage.size, cursorSize,
|
||||
m_currentCursorImage.scale, state->monitor->m_scale, xbox.size());
|
||||
Log::logger->log(Log::TRACE, "[pointer] monitor: {}, size: {}, hw buf: {}, scale: {:.2f}, monscale: {:.2f}, xbox: {}", state->monitor->m_name, m_currentCursorImage.size,
|
||||
cursorSize, m_currentCursorImage.scale, state->monitor->m_scale, xbox.size());
|
||||
|
||||
g_pHyprOpenGL->renderTexture(texture, xbox, {});
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ CProtocolManager::CProtocolManager() {
|
|||
PROTO::sync = makeUnique<CDRMSyncobjProtocol>(&wp_linux_drm_syncobj_manager_v1_interface, 1, "DRMSyncobj");
|
||||
Log::logger->log(Log::DEBUG, "DRM Syncobj Timeline support detected, enabling explicit sync protocol");
|
||||
} else
|
||||
Log::logger->log(Log::WARN, "DRM Syncobj Timeline not supported, skipping explicit sync protocol");
|
||||
Log::logger->log(Log::WARN, "DRM Syncobj Timeline not supported, skipping explicit sync protocol");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -232,7 +232,7 @@ CProtocolManager::CProtocolManager() {
|
|||
PROTO::mesaDRM = makeUnique<CMesaDRMProtocol>(&wl_drm_interface, 2, "MesaDRM");
|
||||
PROTO::linuxDma = makeUnique<CLinuxDMABufV1Protocol>(&zwp_linux_dmabuf_v1_interface, 5, "LinuxDMABUF");
|
||||
} else
|
||||
Log::logger->log(Log::WARN, "ProtocolManager: Not binding linux-dmabuf and MesaDRM: DMABUF not available");
|
||||
Log::logger->log(Log::WARN, "ProtocolManager: Not binding linux-dmabuf and MesaDRM: DMABUF not available");
|
||||
}
|
||||
|
||||
CProtocolManager::~CProtocolManager() {
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ SP<CWLSeatResource> CSeatManager::seatResourceForClient(wl_client* client) {
|
|||
|
||||
void CSeatManager::setCurrentSelection(SP<IDataSource> source) {
|
||||
if (source == m_selection.currentSelection) {
|
||||
Log::logger->log(Log::WARN, "[seat] duplicated setCurrentSelection?");
|
||||
Log::logger->log(Log::WARN, "[seat] duplicated setCurrentSelection?");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -590,7 +590,7 @@ void CSeatManager::setCurrentSelection(SP<IDataSource> source) {
|
|||
|
||||
void CSeatManager::setCurrentPrimarySelection(SP<IDataSource> source) {
|
||||
if (source == m_selection.currentPrimarySelection) {
|
||||
Log::logger->log(Log::WARN, "[seat] duplicated setCurrentPrimarySelection?");
|
||||
Log::logger->log(Log::WARN, "[seat] duplicated setCurrentPrimarySelection?");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ SP<SXCursors> CXCursorManager::getShape(std::string const& shape, int size, floa
|
|||
return c;
|
||||
}
|
||||
|
||||
Log::logger->log(Log::WARN, "XCursor couldn't find shape {} , using default cursor instead", shape);
|
||||
Log::logger->log(Log::WARN, "XCursor couldn't find shape {} , using default cursor instead", shape);
|
||||
return m_defaultCursor;
|
||||
}
|
||||
|
||||
|
|
@ -496,11 +496,11 @@ std::vector<SP<SXCursors>> CXCursorManager::loadStandardCursors(std::string cons
|
|||
auto xImages = XcursorShapeLoadImages(i << 1 /* wtf xcursor? */, name.c_str(), size);
|
||||
|
||||
if (!xImages) {
|
||||
Log::logger->log(Log::WARN, "XCursor failed to find a shape with name {}, trying size 24.", shape);
|
||||
Log::logger->log(Log::WARN, "XCursor failed to find a shape with name {}, trying size 24.", shape);
|
||||
xImages = XcursorShapeLoadImages(i << 1 /* wtf xcursor? */, name.c_str(), 24);
|
||||
|
||||
if (!xImages) {
|
||||
Log::logger->log(Log::WARN, "XCursor failed to find a shape with name {}, skipping", shape);
|
||||
Log::logger->log(Log::WARN, "XCursor failed to find a shape with name {}, skipping", shape);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -528,7 +528,7 @@ std::vector<SP<SXCursors>> CXCursorManager::loadAllFromDir(std::string const& pa
|
|||
for (const auto& entry : std::filesystem::directory_iterator(path)) {
|
||||
std::error_code e1, e2;
|
||||
if ((!entry.is_regular_file(e1) && !entry.is_symlink(e2)) || e1 || e2) {
|
||||
Log::logger->log(Log::WARN, "XCursor failed to load shape {}: {}", entry.path().stem().string(), e1 ? e1.message() : e2.message());
|
||||
Log::logger->log(Log::WARN, "XCursor failed to load shape {}: {}", entry.path().stem().string(), e1 ? e1.message() : e2.message());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -542,11 +542,11 @@ std::vector<SP<SXCursors>> CXCursorManager::loadAllFromDir(std::string const& pa
|
|||
auto xImages = XcursorFileLoadImages(f.get(), size);
|
||||
|
||||
if (!xImages) {
|
||||
Log::logger->log(Log::WARN, "XCursor failed to load image {}, trying size 24.", full);
|
||||
Log::logger->log(Log::WARN, "XCursor failed to load image {}, trying size 24.", full);
|
||||
xImages = XcursorFileLoadImages(f.get(), 24);
|
||||
|
||||
if (!xImages) {
|
||||
Log::logger->log(Log::WARN, "XCursor failed to load image {}, skipping", full);
|
||||
Log::logger->log(Log::WARN, "XCursor failed to load image {}, skipping", full);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -578,7 +578,7 @@ void CXCursorManager::syncGsettings() {
|
|||
auto* gSettingsSchemaSource = g_settings_schema_source_get_default();
|
||||
|
||||
if (!gSettingsSchemaSource) {
|
||||
Log::logger->log(Log::WARN, "GSettings default schema source does not exist, can't sync GSettings");
|
||||
Log::logger->log(Log::WARN, "GSettings default schema source does not exist, can't sync GSettings");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -596,14 +596,14 @@ void CXCursorManager::syncGsettings() {
|
|||
using SettingValue = std::variant<std::string, int>;
|
||||
auto setValue = [&checkParamExists](std::string const& paramName, const SettingValue& paramValue, std::string const& category) {
|
||||
if (!checkParamExists(paramName, category)) {
|
||||
Log::logger->log(Log::WARN, "GSettings parameter doesn't exist {} in {}", paramName, category);
|
||||
Log::logger->log(Log::WARN, "GSettings parameter doesn't exist {} in {}", paramName, category);
|
||||
return;
|
||||
}
|
||||
|
||||
auto* gsettings = g_settings_new(category.c_str());
|
||||
|
||||
if (!gsettings) {
|
||||
Log::logger->log(Log::WARN, "GSettings failed to allocate new settings with category {}", category);
|
||||
Log::logger->log(Log::WARN, "GSettings failed to allocate new settings with category {}", category);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ void CHyprXWaylandManager::activateSurface(SP<CWLSurfaceResource> pSurface, bool
|
|||
|
||||
auto HLSurface = Desktop::View::CWLSurface::fromResource(pSurface);
|
||||
if (!HLSurface) {
|
||||
Log::logger->log(Log::TRACE, "CHyprXWaylandManager::activateSurface on non-desktop surface, ignoring");
|
||||
Log::logger->log(Log::TRACE, "CHyprXWaylandManager::activateSurface on non-desktop surface, ignoring");
|
||||
return;
|
||||
}
|
||||
|
||||
const auto PWINDOW = Desktop::View::CWindow::fromView(HLSurface->view());
|
||||
if (!PWINDOW) {
|
||||
Log::logger->log(Log::TRACE, "CHyprXWaylandManager::activateSurface on non-window surface, ignoring");
|
||||
Log::logger->log(Log::TRACE, "CHyprXWaylandManager::activateSurface on non-window surface, ignoring");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -275,7 +275,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse, st
|
|||
return;
|
||||
|
||||
} else
|
||||
Log::logger->log(Log::ERR, "BUG THIS: Null SURF/CONSTRAINT in mouse refocus. Ignoring constraints. {:x} {:x}", rc<uintptr_t>(SURF.get()), rc<uintptr_t>(CONSTRAINT.get()));
|
||||
Log::logger->log(Log::ERR, "BUG THIS: Null SURF/CONSTRAINT in mouse refocus. Ignoring constraints. {:x} {:x}", rc<uintptr_t>(SURF.get()),
|
||||
rc<uintptr_t>(CONSTRAINT.get()));
|
||||
}
|
||||
|
||||
if (PMONITOR != Desktop::focusState()->monitor() && (*PMOUSEFOCUSMON || refocus) && m_forcedFocus.expired())
|
||||
|
|
@ -1129,7 +1130,7 @@ void CInputManager::applyConfigToKeyboard(SP<IKeyboard> pKeyboard) {
|
|||
EMIT_HOOK_EVENT("activeLayout", (std::vector<std::any>{pKeyboard, LAYOUTSTR}));
|
||||
|
||||
Log::logger->log(Log::DEBUG, "Set the keyboard layout to {} and variant to {} for keyboard \"{}\"", pKeyboard->m_currentRules.layout, pKeyboard->m_currentRules.variant,
|
||||
pKeyboard->m_hlName);
|
||||
pKeyboard->m_hlName);
|
||||
}
|
||||
|
||||
void CInputManager::newVirtualMouse(SP<CVirtualPointerV1Resource> mouse) {
|
||||
|
|
@ -1169,8 +1170,8 @@ void CInputManager::setupMouse(SP<IPointer> mauz) {
|
|||
const auto LIBINPUTDEV = mauz->aq()->getLibinputHandle();
|
||||
|
||||
Log::logger->log(Log::DEBUG, "New mouse has libinput sens {:.2f} ({:.2f}) with accel profile {} ({})", libinput_device_config_accel_get_speed(LIBINPUTDEV),
|
||||
libinput_device_config_accel_get_default_speed(LIBINPUTDEV), sc<int>(libinput_device_config_accel_get_profile(LIBINPUTDEV)),
|
||||
sc<int>(libinput_device_config_accel_get_default_profile(LIBINPUTDEV)));
|
||||
libinput_device_config_accel_get_default_speed(LIBINPUTDEV), sc<int>(libinput_device_config_accel_get_profile(LIBINPUTDEV)),
|
||||
sc<int>(libinput_device_config_accel_get_default_profile(LIBINPUTDEV)));
|
||||
}
|
||||
|
||||
g_pPointerManager->attachPointer(mauz);
|
||||
|
|
@ -1237,7 +1238,7 @@ void CInputManager::setPointerConfigs() {
|
|||
else if (TAP_MAP == "lmr")
|
||||
libinput_device_config_tap_set_button_map(LIBINPUTDEV, LIBINPUT_CONFIG_TAP_MAP_LMR);
|
||||
else
|
||||
Log::logger->log(Log::WARN, "Tap button mapping unknown");
|
||||
Log::logger->log(Log::WARN, "Tap button mapping unknown");
|
||||
}
|
||||
|
||||
const auto SCROLLMETHOD = g_pConfigManager->getDeviceString(devname, "scroll_method", "input:scroll_method");
|
||||
|
|
@ -1252,7 +1253,7 @@ void CInputManager::setPointerConfigs() {
|
|||
} else if (SCROLLMETHOD == "on_button_down") {
|
||||
libinput_device_config_scroll_set_method(LIBINPUTDEV, LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN);
|
||||
} else {
|
||||
Log::logger->log(Log::WARN, "Scroll method unknown");
|
||||
Log::logger->log(Log::WARN, "Scroll method unknown");
|
||||
}
|
||||
|
||||
if (g_pConfigManager->getDeviceInt(devname, "tap-and-drag", "input:touchpad:tap-and-drag") == 0)
|
||||
|
|
@ -1339,7 +1340,7 @@ void CInputManager::setPointerConfigs() {
|
|||
libinput_config_accel_destroy(CONFIG);
|
||||
} catch (std::exception& e) { Log::logger->log(Log::ERR, "Invalid values in custom accel profile"); }
|
||||
} else {
|
||||
Log::logger->log(Log::WARN, "Unknown acceleration profile, falling back to default");
|
||||
Log::logger->log(Log::WARN, "Unknown acceleration profile, falling back to default");
|
||||
}
|
||||
|
||||
const auto SCROLLBUTTON = g_pConfigManager->getDeviceInt(devname, "scroll_button", "input:scroll_button");
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ void CTextInput::onCommit() {
|
|||
}
|
||||
|
||||
if (!(isV3() ? m_v3Input->m_current.enabled.value : m_v1Input->m_active)) {
|
||||
Log::logger->log(Log::WARN, "Disabled TextInput commit?");
|
||||
Log::logger->log(Log::WARN, "Disabled TextInput commit?");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) {
|
|||
if (g_pSessionLockManager->isSessionLocked() && m_foundLSToFocus.expired()) {
|
||||
m_touchData.touchFocusLockSurface = g_pSessionLockManager->getSessionLockSurfaceForMonitor(PMONITOR->m_id);
|
||||
if (!m_touchData.touchFocusLockSurface)
|
||||
Log::logger->log(Log::WARN, "The session is locked but can't find a lock surface");
|
||||
Log::logger->log(Log::WARN, "The session is locked but can't find a lock surface");
|
||||
else
|
||||
m_touchData.touchFocusSurface = m_touchData.touchFocusLockSurface->surface->surface();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ void CTrackpadGestures::gestureUpdate(const IPointer::SSwipeUpdateEvent& e) {
|
|||
|
||||
// 5 was chosen because I felt like that's a good number.
|
||||
if (!m_activeGesture && (std::abs(m_currentTotalDelta.x) < 5 && std::abs(m_currentTotalDelta.y) < 5)) {
|
||||
Log::logger->log(Log::TRACE, "CTrackpadGestures::gestureUpdate (swipe): gesture delta too small to start considering, waiting");
|
||||
Log::logger->log(Log::TRACE, "CTrackpadGestures::gestureUpdate (swipe): gesture delta too small to start considering, waiting");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -189,7 +189,7 @@ void CTrackpadGestures::gestureUpdate(const IPointer::SPinchUpdateEvent& e) {
|
|||
|
||||
// 0.1 was chosen because I felt like that's a good number.
|
||||
if (!m_activeGesture && std::abs(e.scale - 1.F) < 0.1) {
|
||||
Log::logger->log(Log::TRACE, "CTrackpadGestures::gestureUpdate (pinch): gesture delta too small to start considering, waiting");
|
||||
Log::logger->log(Log::TRACE, "CTrackpadGestures::gestureUpdate (pinch): gesture delta too small to start considering, waiting");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,19 +82,19 @@ eDynamicPermissionAllowMode CDynamicPermissionManager::clientPermissionMode(wl_c
|
|||
|
||||
const auto LOOKUP = binaryNameForWlClient(client);
|
||||
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: checking permission {} for client {:x} (binary {})", permissionToString(permission), rc<uintptr_t>(client),
|
||||
LOOKUP.has_value() ? LOOKUP.value() : "lookup failed: " + LOOKUP.error());
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: checking permission {} for client {:x} (binary {})", permissionToString(permission),
|
||||
rc<uintptr_t>(client), LOOKUP.has_value() ? LOOKUP.value() : "lookup failed: " + LOOKUP.error());
|
||||
|
||||
// first, check if we have the client + perm combo in our cache.
|
||||
auto it = std::ranges::find_if(m_rules, [client, permission](const auto& e) { return e->m_client == client && e->m_type == permission; });
|
||||
if (it == m_rules.end()) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission not cached, checking binary name");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission not cached, checking binary name");
|
||||
|
||||
if (!LOOKUP.has_value())
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: binary name check failed");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: binary name check failed");
|
||||
else {
|
||||
const auto BINNAME = LOOKUP.value().contains("/") ? LOOKUP.value().substr(LOOKUP.value().find_last_of('/') + 1) : LOOKUP.value();
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: binary path {}, name {}", LOOKUP.value(), BINNAME);
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: binary path {}, name {}", LOOKUP.value(), BINNAME);
|
||||
|
||||
it = std::ranges::find_if(m_rules, [clientBinaryPath = LOOKUP.value(), permission](const auto& e) {
|
||||
if (e->m_type != permission)
|
||||
|
|
@ -114,29 +114,29 @@ eDynamicPermissionAllowMode CDynamicPermissionManager::clientPermissionMode(wl_c
|
|||
});
|
||||
|
||||
if (it == m_rules.end())
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: no rule for binary");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: no rule for binary");
|
||||
else {
|
||||
if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_ALLOW) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission allowed by config rule");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission allowed by config rule");
|
||||
return PERMISSION_RULE_ALLOW_MODE_ALLOW;
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_DENY) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission denied by config rule");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission denied by config rule");
|
||||
return PERMISSION_RULE_ALLOW_MODE_DENY;
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_PENDING) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission pending by config rule");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission pending by config rule");
|
||||
return PERMISSION_RULE_ALLOW_MODE_PENDING;
|
||||
} else
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission ask by config rule");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission ask by config rule");
|
||||
}
|
||||
}
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_ALLOW) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission allowed before by user");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission allowed before by user");
|
||||
return PERMISSION_RULE_ALLOW_MODE_ALLOW;
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_DENY) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission denied before by user");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission denied before by user");
|
||||
return PERMISSION_RULE_ALLOW_MODE_DENY;
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_PENDING) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission pending before by user");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission pending before by user");
|
||||
return PERMISSION_RULE_ALLOW_MODE_PENDING;
|
||||
}
|
||||
|
||||
|
|
@ -158,8 +158,8 @@ eDynamicPermissionAllowMode CDynamicPermissionManager::clientPermissionModeWithS
|
|||
if (pid > 0) {
|
||||
lookup = binaryNameForPid(pid);
|
||||
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: checking permission {} for key {} (binary {})", permissionToString(permission), str,
|
||||
lookup.has_value() ? lookup.value() : "lookup failed: " + lookup.error());
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: checking permission {} for key {} (binary {})", permissionToString(permission), str,
|
||||
lookup.has_value() ? lookup.value() : "lookup failed: " + lookup.error());
|
||||
|
||||
if (lookup.has_value())
|
||||
binaryName = *lookup;
|
||||
|
|
@ -169,7 +169,7 @@ eDynamicPermissionAllowMode CDynamicPermissionManager::clientPermissionModeWithS
|
|||
// first, check if we have the client + perm combo in our cache.
|
||||
auto it = std::ranges::find_if(m_rules, [str, permission, pid](const auto& e) { return e->m_keyString == str && pid && pid == e->m_pid && e->m_type == permission; });
|
||||
if (it == m_rules.end()) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission not cached, checking key");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission not cached, checking key");
|
||||
|
||||
it = std::ranges::find_if(m_rules, [key = str, permission, &lookup](const auto& e) {
|
||||
if (e->m_type != permission)
|
||||
|
|
@ -186,33 +186,33 @@ eDynamicPermissionAllowMode CDynamicPermissionManager::clientPermissionModeWithS
|
|||
});
|
||||
|
||||
if (it == m_rules.end())
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: no rule for key");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: no rule for key");
|
||||
else {
|
||||
if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_ALLOW) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission allowed by config rule");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission allowed by config rule");
|
||||
return PERMISSION_RULE_ALLOW_MODE_ALLOW;
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_DENY) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission denied by config rule");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission denied by config rule");
|
||||
return PERMISSION_RULE_ALLOW_MODE_DENY;
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_PENDING) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission pending by config rule");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission pending by config rule");
|
||||
return PERMISSION_RULE_ALLOW_MODE_PENDING;
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_ASK) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission ask by config rule");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission ask by config rule");
|
||||
askForPermission(nullptr, str, permission, pid);
|
||||
return PERMISSION_RULE_ALLOW_MODE_PENDING;
|
||||
} else
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission ask by config rule");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission ask by config rule");
|
||||
}
|
||||
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_ALLOW) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission allowed before by user");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission allowed before by user");
|
||||
return PERMISSION_RULE_ALLOW_MODE_ALLOW;
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_DENY) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission denied before by user");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission denied before by user");
|
||||
return PERMISSION_RULE_ALLOW_MODE_DENY;
|
||||
} else if ((*it)->m_allowMode == PERMISSION_RULE_ALLOW_MODE_PENDING) {
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission pending before by user");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionManager::clientHasPermission: permission pending before by user");
|
||||
return PERMISSION_RULE_ALLOW_MODE_PENDING;
|
||||
}
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ void CDynamicPermissionManager::askForPermission(wl_client* client, const std::s
|
|||
|
||||
if (pr->hasError()) {
|
||||
// not reachable for now
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionRule: error spawning dialog box");
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionRule: error spawning dialog box");
|
||||
if (r->m_promiseResolverForExternal)
|
||||
r->m_promiseResolverForExternal->reject("error spawning dialog box");
|
||||
r->m_promiseResolverForExternal.reset();
|
||||
|
|
@ -293,7 +293,7 @@ void CDynamicPermissionManager::askForPermission(wl_client* client, const std::s
|
|||
|
||||
const std::string& result = pr->result();
|
||||
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionRule: user returned {}", result);
|
||||
Log::logger->log(Log::TRACE, "CDynamicPermissionRule: user returned {}", result);
|
||||
|
||||
if (result.starts_with(ALLOW_ONCE))
|
||||
r->m_allowMode = PERMISSION_RULE_ALLOW_MODE_ALLOW;
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ static uintptr_t seekNewPageAddr() {
|
|||
|
||||
uint64_t start = 0, end = 0;
|
||||
if (props[0].empty()) {
|
||||
Log::logger->log(Log::WARN, "seekNewPageAddr: unexpected line in self maps");
|
||||
Log::logger->log(Log::WARN, "seekNewPageAddr: unexpected line in self maps");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -310,7 +310,7 @@ static uintptr_t seekNewPageAddr() {
|
|||
start = std::stoull(startEnd[0], nullptr, 16);
|
||||
end = std::stoull(startEnd[1], nullptr, 16);
|
||||
} catch (std::exception& e) {
|
||||
Log::logger->log(Log::WARN, "seekNewPageAddr: unexpected line in self maps: {}", line);
|
||||
Log::logger->log(Log::WARN, "seekNewPageAddr: unexpected line in self maps: {}", line);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -352,9 +352,9 @@ APICALL std::vector<SFunctionMatch> HyprlandAPI::findFunctionsByName(HANDLE hand
|
|||
if (SYMBOLS.empty()) {
|
||||
Log::logger->log(Log::ERR, R"(Unable to search for function "{}": no symbols found in binary (is "{}" in path?))", name,
|
||||
#ifdef __clang__
|
||||
"llvm-nm"
|
||||
"llvm-nm"
|
||||
#else
|
||||
"nm"
|
||||
"nm"
|
||||
#endif
|
||||
);
|
||||
return {};
|
||||
|
|
|
|||
|
|
@ -135,8 +135,8 @@ std::expected<CPlugin*, std::string> CPluginSystem::loadPluginInternal(const std
|
|||
|
||||
g_pEventLoopManager->doLater([] { g_pConfigManager->reload(); });
|
||||
|
||||
Log::logger->log(Log::DEBUG, R"( [PluginSystem] Plugin {} loaded. Handle: {:x}, path: "{}", author: "{}", description: "{}", version: "{}")", PLUGINDATA.name, rc<uintptr_t>(MODULE), path,
|
||||
PLUGINDATA.author, PLUGINDATA.description, PLUGINDATA.version);
|
||||
Log::logger->log(Log::DEBUG, R"( [PluginSystem] Plugin {} loaded. Handle: {:x}, path: "{}", author: "{}", description: "{}", version: "{}")", PLUGINDATA.name,
|
||||
rc<uintptr_t>(MODULE), path, PLUGINDATA.author, PLUGINDATA.description, PLUGINDATA.version);
|
||||
|
||||
return PLUGIN;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,8 @@ CFrogColorManagementSurface::CFrogColorManagementSurface(SP<CFrogColorManagedSur
|
|||
});
|
||||
m_resource->setSetHdrMetadata([this](CFrogColorManagedSurface* r, uint32_t r_x, uint32_t r_y, uint32_t g_x, uint32_t g_y, uint32_t b_x, uint32_t b_y, uint32_t w_x,
|
||||
uint32_t w_y, uint32_t max_lum, uint32_t min_lum, uint32_t cll, uint32_t fall) {
|
||||
LOGM(Log::TRACE, "Set frog primaries r:{},{} g:{},{} b:{},{} w:{},{} luminances {} - {} cll {} fall {}", r_x, r_y, g_x, g_y, b_x, b_y, w_x, w_y, min_lum, max_lum, cll, fall);
|
||||
LOGM(Log::TRACE, "Set frog primaries r:{},{} g:{},{} b:{},{} w:{},{} luminances {} - {} cll {} fall {}", r_x, r_y, g_x, g_y, b_x, b_y, w_x, w_y, min_lum, max_lum, cll,
|
||||
fall);
|
||||
m_surface->m_colorManagement->m_imageDescription.masteringPrimaries = SPCPRimaries{.red = {.x = r_x / 50000.0f, .y = r_y / 50000.0f},
|
||||
.green = {.x = g_x / 50000.0f, .y = g_y / 50000.0f},
|
||||
.blue = {.x = b_x / 50000.0f, .y = b_y / 50000.0f},
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ CWLOutputProtocol::CWLOutputProtocol(const wl_interface* iface, const int& ver,
|
|||
|
||||
void CWLOutputProtocol::bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id) {
|
||||
if UNLIKELY (m_defunct)
|
||||
Log::logger->log(Log::WARN, "[wl_output] Binding a wl_output that's inert?? Possible client bug.");
|
||||
Log::logger->log(Log::WARN, "[wl_output] Binding a wl_output that's inert?? Possible client bug.");
|
||||
|
||||
const auto RESOURCE = m_outputs.emplace_back(makeShared<CWLOutputResource>(makeShared<CWlOutput>(client, ver, id), m_monitor.lock()));
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ CHyprRenderer::CHyprRenderer() {
|
|||
m_software = true;
|
||||
|
||||
Log::logger->log(Log::DEBUG, "DRM driver information: {} v{}.{}.{} from {} description {}", name, DRMV->version_major, DRMV->version_minor, DRMV->version_patchlevel,
|
||||
std::string{DRMV->date, DRMV->date_len}, std::string{DRMV->desc, DRMV->desc_len});
|
||||
std::string{DRMV->date, DRMV->date_len}, std::string{DRMV->desc, DRMV->desc_len});
|
||||
|
||||
drmFreeVersion(DRMV);
|
||||
}
|
||||
|
|
@ -98,8 +98,8 @@ CHyprRenderer::CHyprRenderer() {
|
|||
else if (name.contains("softpipe") || name.contains("Software Rasterizer") || name.contains("llvmpipe"))
|
||||
m_software = true;
|
||||
|
||||
Log::logger->log(Log::DEBUG, "Primary DRM driver information: {} v{}.{}.{} from {} description {}", name, DRMV->version_major, DRMV->version_minor, DRMV->version_patchlevel,
|
||||
std::string{DRMV->date, DRMV->date_len}, std::string{DRMV->desc, DRMV->desc_len});
|
||||
Log::logger->log(Log::DEBUG, "Primary DRM driver information: {} v{}.{}.{} from {} description {}", name, DRMV->version_major, DRMV->version_minor,
|
||||
DRMV->version_patchlevel, std::string{DRMV->date, DRMV->date_len}, std::string{DRMV->desc, DRMV->desc_len});
|
||||
} else {
|
||||
Log::logger->log(Log::DEBUG, "No primary DRM driver information found");
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ CHyprRenderer::CHyprRenderer() {
|
|||
}
|
||||
|
||||
if (m_nvidia)
|
||||
Log::logger->log(Log::WARN, "NVIDIA detected, please remember to follow nvidia instructions on the wiki");
|
||||
Log::logger->log(Log::WARN, "NVIDIA detected, please remember to follow nvidia instructions on the wiki");
|
||||
|
||||
// cursor hiding stuff
|
||||
|
||||
|
|
@ -1529,9 +1529,9 @@ static hdr_output_metadata createHDRMetadata(SImageDescription settings, S
|
|||
auto luminances = settings.masteringLuminances.max > 0 ? settings.masteringLuminances :
|
||||
SImageDescription::SPCMasteringLuminances{.min = monitor->minLuminance(), .max = monitor->maxLuminance(10000)};
|
||||
|
||||
Log::logger->log(Log::TRACE, "ColorManagement primaries {},{} {},{} {},{} {},{}", colorimetry.red.x, colorimetry.red.y, colorimetry.green.x, colorimetry.green.y, colorimetry.blue.x,
|
||||
colorimetry.blue.y, colorimetry.white.x, colorimetry.white.y);
|
||||
Log::logger->log(Log::TRACE, "ColorManagement min {}, max {}, cll {}, fall {}", luminances.min, luminances.max, settings.maxCLL, settings.maxFALL);
|
||||
Log::logger->log(Log::TRACE, "ColorManagement primaries {},{} {},{} {},{} {},{}", colorimetry.red.x, colorimetry.red.y, colorimetry.green.x, colorimetry.green.y,
|
||||
colorimetry.blue.x, colorimetry.blue.y, colorimetry.white.x, colorimetry.white.y);
|
||||
Log::logger->log(Log::TRACE, "ColorManagement min {}, max {}, cll {}, fall {}", luminances.min, luminances.max, settings.maxCLL, settings.maxFALL);
|
||||
return hdr_output_metadata{
|
||||
.metadata_type = 0,
|
||||
.hdmi_metadata_type1 =
|
||||
|
|
@ -1589,11 +1589,11 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
|||
// passthrough
|
||||
bool needsHdrMetadataUpdate = SURF->m_colorManagement->needsHdrMetadataUpdate() || pMonitor->m_previousFSWindow != FS_WINDOW || pMonitor->m_needsHDRupdate;
|
||||
if (SURF->m_colorManagement->needsHdrMetadataUpdate()) {
|
||||
Log::logger->log(Log::INFO, "[CM] Recreating HDR metadata for surface");
|
||||
Log::logger->log(Log::INFO, "[CM] Recreating HDR metadata for surface");
|
||||
SURF->m_colorManagement->setHDRMetadata(createHDRMetadata(SURF->m_colorManagement->imageDescription(), pMonitor));
|
||||
}
|
||||
if (needsHdrMetadataUpdate) {
|
||||
Log::logger->log(Log::INFO, "[CM] Updating HDR metadata from surface");
|
||||
Log::logger->log(Log::INFO, "[CM] Updating HDR metadata from surface");
|
||||
pMonitor->m_output->state->setHDRMetadata(SURF->m_colorManagement->hdrMetadata());
|
||||
}
|
||||
hdrIsHandled = true;
|
||||
|
|
@ -1610,11 +1610,11 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
|||
// FIXME ok for now, will need some other logic if monitor image description can be modified some other way
|
||||
const auto targetCM = wantHDR ? (*PAUTOHDR == 2 ? NCMType::CM_HDR_EDID : NCMType::CM_HDR) : pMonitor->m_cmType;
|
||||
const auto targetSDREOTF = pMonitor->m_sdrEotf;
|
||||
Log::logger->log(Log::INFO, "[CM] Auto HDR: changing monitor cm to {}", sc<uint8_t>(targetCM));
|
||||
Log::logger->log(Log::INFO, "[CM] Auto HDR: changing monitor cm to {}", sc<uint8_t>(targetCM));
|
||||
pMonitor->applyCMType(targetCM, targetSDREOTF);
|
||||
pMonitor->m_previousFSWindow.reset(); // trigger CTM update
|
||||
}
|
||||
Log::logger->log(Log::INFO, wantHDR ? "[CM] Updating HDR metadata from monitor" : "[CM] Restoring SDR mode");
|
||||
Log::logger->log(Log::INFO, wantHDR ? "[CM] Updating HDR metadata from monitor" : "[CM] Restoring SDR mode");
|
||||
pMonitor->m_output->state->setHDRMetadata(wantHDR ? createHDRMetadata(pMonitor->m_imageDescription, pMonitor) : NO_HDR_METADATA);
|
||||
}
|
||||
pMonitor->m_needsHDRupdate = true;
|
||||
|
|
@ -1623,12 +1623,12 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
|||
|
||||
const bool needsWCG = pMonitor->wantsWideColor();
|
||||
if (pMonitor->m_output->state->state().wideColorGamut != needsWCG) {
|
||||
Log::logger->log(Log::TRACE, "Setting wide color gamut {}", needsWCG ? "on" : "off");
|
||||
Log::logger->log(Log::TRACE, "Setting wide color gamut {}", needsWCG ? "on" : "off");
|
||||
pMonitor->m_output->state->setWideColorGamut(needsWCG);
|
||||
|
||||
// FIXME do not trust enabled10bit, auto switch to 10bit and back if needed
|
||||
if (needsWCG && !pMonitor->m_enabled10bit) {
|
||||
Log::logger->log(Log::WARN, "Wide color gamut is enabled but the display is not in 10bit mode");
|
||||
Log::logger->log(Log::WARN, "Wide color gamut is enabled but the display is not in 10bit mode");
|
||||
static bool shown = false;
|
||||
if (!shown) {
|
||||
g_pHyprNotificationOverlay->addNotification(I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_WIDE_COLOR_NOT_10B, {{"name", pMonitor->m_name}}), CHyprColor{}, 15000,
|
||||
|
|
@ -1645,14 +1645,14 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
|||
if (*PNONSHADER == CM_NS_IGNORE || !FS_WINDOW || !pMonitor->needsCM() || !pMonitor->canNoShaderCM() ||
|
||||
(*PNONSHADER == CM_NS_ONDEMAND && pMonitor->m_lastScanout.expired() && *PPASS != 1)) {
|
||||
if (pMonitor->m_noShaderCTM) {
|
||||
Log::logger->log(Log::INFO, "[CM] No fullscreen CTM, restoring previous one");
|
||||
Log::logger->log(Log::INFO, "[CM] No fullscreen CTM, restoring previous one");
|
||||
pMonitor->m_noShaderCTM = false;
|
||||
pMonitor->m_ctmUpdated = true;
|
||||
}
|
||||
} else {
|
||||
const auto FS_DESC = pMonitor->getFSImageDescription();
|
||||
if (FS_DESC.has_value()) {
|
||||
Log::logger->log(Log::INFO, "[CM] Updating fullscreen CTM");
|
||||
Log::logger->log(Log::INFO, "[CM] Updating fullscreen CTM");
|
||||
pMonitor->m_noShaderCTM = true;
|
||||
const auto mat = FS_DESC->getPrimaries().convertMatrix(pMonitor->m_imageDescription.getPrimaries()).mat();
|
||||
const std::array<float, 9> CTM = {
|
||||
|
|
@ -1675,13 +1675,13 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
|||
bool ok = pMonitor->m_state.commit();
|
||||
if (!ok) {
|
||||
if (pMonitor->m_inFence.isValid()) {
|
||||
Log::logger->log(Log::TRACE, "Monitor state commit failed, retrying without a fence");
|
||||
Log::logger->log(Log::TRACE, "Monitor state commit failed, retrying without a fence");
|
||||
pMonitor->m_output->state->resetExplicitFences();
|
||||
ok = pMonitor->m_state.commit();
|
||||
}
|
||||
|
||||
if (!ok) {
|
||||
Log::logger->log(Log::TRACE, "Monitor state commit failed");
|
||||
Log::logger->log(Log::TRACE, "Monitor state commit failed");
|
||||
// rollback the buffer to avoid writing to the front buffer that is being
|
||||
// displayed
|
||||
pMonitor->m_output->swapchain->rollback();
|
||||
|
|
@ -1942,7 +1942,7 @@ void CHyprRenderer::damageSurface(SP<CWLSurfaceResource> pSurface, double x, dou
|
|||
|
||||
if (*PLOGDAMAGE)
|
||||
Log::logger->log(Log::DEBUG, "Damage: Surface (extents): xy: {}, {} wh: {}, {}", damageBox.pixman()->extents.x1, damageBox.pixman()->extents.y1,
|
||||
damageBox.pixman()->extents.x2 - damageBox.pixman()->extents.x1, damageBox.pixman()->extents.y2 - damageBox.pixman()->extents.y1);
|
||||
damageBox.pixman()->extents.x2 - damageBox.pixman()->extents.x1, damageBox.pixman()->extents.y2 - damageBox.pixman()->extents.y1);
|
||||
}
|
||||
|
||||
void CHyprRenderer::damageWindow(PHLWINDOW pWindow, bool forceFull) {
|
||||
|
|
@ -2344,7 +2344,7 @@ void CHyprRenderer::endRender(const std::function<void()>& renderingDoneCallback
|
|||
PMONITOR->m_output->state->setBuffer(m_currentBuffer);
|
||||
|
||||
if (!g_pHyprOpenGL->explicitSyncSupported()) {
|
||||
Log::logger->log(Log::TRACE, "renderer: Explicit sync unsupported, falling back to implicit in endRender");
|
||||
Log::logger->log(Log::TRACE, "renderer: Explicit sync unsupported, falling back to implicit in endRender");
|
||||
|
||||
// nvidia doesn't have implicit sync, so we have to explicitly wait here, llvmpipe and other software renderer seems to bug out aswell.
|
||||
if ((isNvidia() && *PNVIDIAANTIFLICKER) || isSoftware())
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ CRegion CSurfacePassElement::visibleRegion(bool& cancel) {
|
|||
|
||||
void CSurfacePassElement::discard() {
|
||||
if (!g_pHyprRenderer->m_bBlockSurfaceFeedback) {
|
||||
Log::logger->log(Log::TRACE, "discard for invisible surface");
|
||||
Log::logger->log(Log::TRACE, "discard for invisible surface");
|
||||
m_data.surface->presentFeedback(m_data.when, m_data.pMonitor->m_self.lock(), true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ static bool openSockets(std::array<CFileDescriptor, 2>& sockets, int display) {
|
|||
}
|
||||
#else
|
||||
if (*CREATEABSTRACTSOCKET) {
|
||||
Log::logger->log(Log::WARN, "The abstract XWayland Unix domain socket might be used only on Linux systems. A regular one'll be created instead.");
|
||||
Log::logger->log(Log::WARN, "The abstract XWayland Unix domain socket might be used only on Linux systems. A regular one'll be created instead.");
|
||||
}
|
||||
path = getSocketPath(display, false);
|
||||
strncpy(addr.sun_path, path.c_str(), path.length() + 1);
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ void CXWaylandSurface::ping() {
|
|||
bool supportsPing = std::ranges::find(m_protocols, HYPRATOMS["_NET_WM_PING"]) != m_protocols.end();
|
||||
|
||||
if (!supportsPing) {
|
||||
Log::logger->log(Log::TRACE, "CXWaylandSurface: XID {} does not support ping, just sending an instant reply", m_xID);
|
||||
Log::logger->log(Log::TRACE, "CXWaylandSurface: XID {} does not support ping, just sending an instant reply", m_xID);
|
||||
g_pANRManager->onResponse(m_self.lock());
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ void CXWM::handleMapRequest(xcb_map_request_event_t* e) {
|
|||
XSURF->configure({XSURF->m_geometry.pos(), DESIREDSIZE});
|
||||
|
||||
Log::logger->log(Log::DEBUG, "[xwm] Mapping window {} in X (geometry {}x{} at {}x{}))", e->window, XSURF->m_geometry.width, XSURF->m_geometry.height, XSURF->m_geometry.x,
|
||||
XSURF->m_geometry.y);
|
||||
XSURF->m_geometry.y);
|
||||
|
||||
// read data again. Some apps for some reason fail to send WINDOW_TYPE
|
||||
// this shouldn't happen but does, I prolly fucked up somewhere, this is a band-aid
|
||||
|
|
@ -331,11 +331,11 @@ void CXWM::readProp(SP<CXWaylandSurface> XSURF, uint32_t atom, xcb_get_property_
|
|||
else if (atom == HYPRATOMS["WM_PROTOCOLS"])
|
||||
handleWMProtocols();
|
||||
else {
|
||||
Log::logger->log(Log::TRACE, "[xwm] Unhandled prop {} -> {}", atom, propName);
|
||||
Log::logger->log(Log::TRACE, "[xwm] Unhandled prop {} -> {}", atom, propName);
|
||||
return;
|
||||
}
|
||||
|
||||
Log::logger->log(Log::TRACE, "[xwm] Handled prop {} -> {}", atom, propName);
|
||||
Log::logger->log(Log::TRACE, "[xwm] Handled prop {} -> {}", atom, propName);
|
||||
}
|
||||
|
||||
void CXWM::handlePropertyNotify(xcb_property_notify_event_t* e) {
|
||||
|
|
@ -370,7 +370,7 @@ void CXWM::handleClientMessage(xcb_client_message_event_t* e) {
|
|||
}
|
||||
} else if (e->type == HYPRATOMS["WL_SURFACE_ID"]) {
|
||||
if (XSURF->m_surface) {
|
||||
Log::logger->log(Log::WARN, "[xwm] Re-assignment of WL_SURFACE_ID");
|
||||
Log::logger->log(Log::WARN, "[xwm] Re-assignment of WL_SURFACE_ID");
|
||||
dissociate(XSURF);
|
||||
}
|
||||
|
||||
|
|
@ -382,7 +382,7 @@ void CXWM::handleClientMessage(xcb_client_message_event_t* e) {
|
|||
}
|
||||
} else if (e->type == HYPRATOMS["WL_SURFACE_SERIAL"]) {
|
||||
if (XSURF->m_wlSerial) {
|
||||
Log::logger->log(Log::WARN, "[xwm] Re-assignment of WL_SURFACE_SERIAL");
|
||||
Log::logger->log(Log::WARN, "[xwm] Re-assignment of WL_SURFACE_SERIAL");
|
||||
dissociate(XSURF);
|
||||
}
|
||||
|
||||
|
|
@ -446,7 +446,7 @@ void CXWM::handleClientMessage(xcb_client_message_event_t* e) {
|
|||
XSURF->m_events.activate.emit();
|
||||
} else if (e->type == HYPRATOMS["XdndStatus"]) {
|
||||
if (m_dndDataOffers.empty() || !m_dndDataOffers.at(0)->getSource()) {
|
||||
Log::logger->log(Log::TRACE, "[xwm] Rejecting XdndStatus message: nothing to get");
|
||||
Log::logger->log(Log::TRACE, "[xwm] Rejecting XdndStatus message: nothing to get");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -459,7 +459,7 @@ void CXWM::handleClientMessage(xcb_client_message_event_t* e) {
|
|||
Log::logger->log(Log::DEBUG, "[xwm] XdndStatus: accepted: {}");
|
||||
} else if (e->type == HYPRATOMS["XdndFinished"]) {
|
||||
if (m_dndDataOffers.empty() || !m_dndDataOffers.at(0)->getSource()) {
|
||||
Log::logger->log(Log::TRACE, "[xwm] Rejecting XdndFinished message: nothing to get");
|
||||
Log::logger->log(Log::TRACE, "[xwm] Rejecting XdndFinished message: nothing to get");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -467,11 +467,11 @@ void CXWM::handleClientMessage(xcb_client_message_event_t* e) {
|
|||
|
||||
Log::logger->log(Log::DEBUG, "[xwm] XdndFinished");
|
||||
} else {
|
||||
Log::logger->log(Log::TRACE, "[xwm] Unhandled message prop {} -> {}", e->type, propName);
|
||||
Log::logger->log(Log::TRACE, "[xwm] Unhandled message prop {} -> {}", e->type, propName);
|
||||
return;
|
||||
}
|
||||
|
||||
Log::logger->log(Log::TRACE, "[xwm] Handled message prop {} -> {}", e->type, propName);
|
||||
Log::logger->log(Log::TRACE, "[xwm] Handled message prop {} -> {}", e->type, propName);
|
||||
}
|
||||
|
||||
void CXWM::handleFocusIn(xcb_focus_in_event_t* e) {
|
||||
|
|
@ -490,15 +490,15 @@ void CXWM::handleFocusIn(xcb_focus_in_event_t* e) {
|
|||
}
|
||||
|
||||
void CXWM::handleFocusOut(xcb_focus_out_event_t* e) {
|
||||
Log::logger->log(Log::TRACE, "[xwm] focusOut mode={}, detail={}, event={}", e->mode, e->detail, e->event);
|
||||
Log::logger->log(Log::TRACE, "[xwm] focusOut mode={}, detail={}, event={}", e->mode, e->detail, e->event);
|
||||
|
||||
const auto XSURF = windowForXID(e->event);
|
||||
|
||||
if (!XSURF)
|
||||
return;
|
||||
|
||||
Log::logger->log(Log::TRACE, "[xwm] focusOut for {} {} {} surface {}", XSURF->m_mapped ? "mapped" : "unmapped", XSURF->m_fullscreen ? "fullscreen" : "windowed",
|
||||
XSURF == m_focusedSurface ? "focused" : "unfocused", XSURF->m_state.title);
|
||||
Log::logger->log(Log::TRACE, "[xwm] focusOut for {} {} {} surface {}", XSURF->m_mapped ? "mapped" : "unmapped", XSURF->m_fullscreen ? "fullscreen" : "windowed",
|
||||
XSURF == m_focusedSurface ? "focused" : "unfocused", XSURF->m_state.title);
|
||||
|
||||
// do something?
|
||||
}
|
||||
|
|
@ -570,8 +570,8 @@ void CXWM::handleError(xcb_value_error_t* e) {
|
|||
return;
|
||||
}
|
||||
|
||||
Log::logger->log(Log::ERR, "[xwm] xcb error: {} ({}), code {} ({}), seq {}, val {}", major_name, minor_name ? minor_name : "no minor", error_name, extension ? extension : "no extension",
|
||||
e->sequence, e->bad_value);
|
||||
Log::logger->log(Log::ERR, "[xwm] xcb error: {} ({}), code {} ({}), seq {}, val {}", major_name, minor_name ? minor_name : "no minor", error_name,
|
||||
extension ? extension : "no extension", e->sequence, e->bad_value);
|
||||
}
|
||||
|
||||
void CXWM::selectionSendNotify(xcb_selection_request_event_t* e, bool success) {
|
||||
|
|
@ -621,19 +621,19 @@ std::string CXWM::mimeFromAtom(xcb_atom_t atom) {
|
|||
}
|
||||
|
||||
void CXWM::handleSelectionNotify(xcb_selection_notify_event_t* e) {
|
||||
Log::logger->log(Log::TRACE, "[xwm] Selection notify for {} prop {} target {}", e->selection, e->property, e->target);
|
||||
Log::logger->log(Log::TRACE, "[xwm] Selection notify for {} prop {} target {}", e->selection, e->property, e->target);
|
||||
|
||||
SXSelection* sel = getSelection(e->selection);
|
||||
|
||||
if (e->property == XCB_ATOM_NONE) {
|
||||
auto it = std::ranges::find_if(sel->transfers, [](const auto& t) { return !t->propertyReply; });
|
||||
if (it != sel->transfers.end()) {
|
||||
Log::logger->log(Log::TRACE, "[xwm] converting selection failed");
|
||||
Log::logger->log(Log::TRACE, "[xwm] converting selection failed");
|
||||
sel->transfers.erase(it);
|
||||
}
|
||||
} else if (e->target == HYPRATOMS["TARGETS"]) {
|
||||
if (!m_focusedSurface) {
|
||||
Log::logger->log(Log::TRACE, "[xwm] denying access to write to clipboard because no X client is in focus");
|
||||
Log::logger->log(Log::TRACE, "[xwm] denying access to write to clipboard because no X client is in focus");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -673,8 +673,8 @@ SXSelection* CXWM::getSelection(xcb_atom_t atom) {
|
|||
}
|
||||
|
||||
void CXWM::handleSelectionRequest(xcb_selection_request_event_t* e) {
|
||||
Log::logger->log(Log::TRACE, "[xwm] Selection request for {} prop {} target {} time {} requestor {} selection {}", e->selection, e->property, e->target, e->time, e->requestor,
|
||||
e->selection);
|
||||
Log::logger->log(Log::TRACE, "[xwm] Selection request for {} prop {} target {} time {} requestor {} selection {}", e->selection, e->property, e->target, e->time, e->requestor,
|
||||
e->selection);
|
||||
|
||||
SXSelection* sel = getSelection(e->selection);
|
||||
|
||||
|
|
@ -696,7 +696,7 @@ void CXWM::handleSelectionRequest(xcb_selection_request_event_t* e) {
|
|||
}
|
||||
|
||||
if (!g_pSeatManager->m_state.keyboardFocusResource || g_pSeatManager->m_state.keyboardFocusResource->client() != g_pXWayland->m_server->m_xwaylandClient) {
|
||||
Log::logger->log(Log::TRACE, "[xwm] Ignoring clipboard access: xwayland not in focus");
|
||||
Log::logger->log(Log::TRACE, "[xwm] Ignoring clipboard access: xwayland not in focus");
|
||||
selectionSendNotify(e, false);
|
||||
return;
|
||||
}
|
||||
|
|
@ -710,7 +710,7 @@ void CXWM::handleSelectionRequest(xcb_selection_request_event_t* e) {
|
|||
mimes = m_dndDataOffers.at(0)->m_source->mimes();
|
||||
|
||||
if (mimes.empty())
|
||||
Log::logger->log(Log::WARN, "[xwm] WARNING: No mimes in TARGETS?");
|
||||
Log::logger->log(Log::WARN, "[xwm] WARNING: No mimes in TARGETS?");
|
||||
|
||||
std::vector<xcb_atom_t> atoms;
|
||||
// reserve to avoid reallocations
|
||||
|
|
@ -747,7 +747,7 @@ void CXWM::handleSelectionRequest(xcb_selection_request_event_t* e) {
|
|||
}
|
||||
|
||||
bool CXWM::handleSelectionXFixesNotify(xcb_xfixes_selection_notify_event_t* e) {
|
||||
Log::logger->log(Log::TRACE, "[xwm] Selection xfixes notify for {}", e->selection);
|
||||
Log::logger->log(Log::TRACE, "[xwm] Selection xfixes notify for {}", e->selection);
|
||||
|
||||
// IMPORTANT: mind the g_pSeatManager below
|
||||
SXSelection* sel = getSelection(e->selection);
|
||||
|
|
@ -844,7 +844,7 @@ int CXWM::onEvent(int fd, uint32_t mask) {
|
|||
case XCB_FOCUS_OUT: handleFocusOut(rc<xcb_focus_out_event_t*>(event.get())); break;
|
||||
case 0: handleError(rc<xcb_value_error_t*>(event.get())); break;
|
||||
default: {
|
||||
Log::logger->log(Log::TRACE, "[xwm] unhandled event {}", event->response_type & XCB_EVENT_RESPONSE_TYPE_MASK);
|
||||
Log::logger->log(Log::TRACE, "[xwm] unhandled event {}", event->response_type & XCB_EVENT_RESPONSE_TYPE_MASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -875,7 +875,7 @@ void CXWM::gatherResources() {
|
|||
m_xfixes = xcb_get_extension_data(getConnection(), &xcb_xfixes_id);
|
||||
|
||||
if (!m_xfixes || !m_xfixes->present)
|
||||
Log::logger->log(Log::WARN, "XFixes not available");
|
||||
Log::logger->log(Log::WARN, "XFixes not available");
|
||||
|
||||
auto xfixes_cookie = xcb_xfixes_query_version(getConnection(), XCB_XFIXES_MAJOR_VERSION, XCB_XFIXES_MINOR_VERSION);
|
||||
XCBReplyPtr<xcb_xfixes_query_version_reply_t> xfixes_reply(xcb_xfixes_query_version_reply(getConnection(), xfixes_cookie, nullptr));
|
||||
|
|
@ -1051,8 +1051,8 @@ void CXWM::activateSurface(SP<CXWaylandSurface> surf, bool activate) {
|
|||
}
|
||||
|
||||
void CXWM::sendState(SP<CXWaylandSurface> surf) {
|
||||
Log::logger->log(Log::TRACE, "[xwm] sendState for {} {} {} surface {}", surf->m_mapped ? "mapped" : "unmapped", surf->m_fullscreen ? "fullscreen" : "windowed",
|
||||
surf == m_focusedSurface ? "focused" : "unfocused", surf->m_state.title);
|
||||
Log::logger->log(Log::TRACE, "[xwm] sendState for {} {} {} surface {}", surf->m_mapped ? "mapped" : "unmapped", surf->m_fullscreen ? "fullscreen" : "windowed",
|
||||
surf == m_focusedSurface ? "focused" : "unfocused", surf->m_state.title);
|
||||
if (surf->m_fullscreen && surf->m_mapped && surf == m_focusedSurface)
|
||||
surf->setWithdrawn(false); // resend normal state
|
||||
|
||||
|
|
@ -1096,7 +1096,7 @@ void CXWM::onNewSurface(SP<CWLSurfaceResource> surf) {
|
|||
return;
|
||||
}
|
||||
|
||||
Log::logger->log(Log::WARN, "[xwm] CXWM::onNewSurface: no matching xwaylandSurface");
|
||||
Log::logger->log(Log::WARN, "[xwm] CXWM::onNewSurface: no matching xwaylandSurface");
|
||||
}
|
||||
|
||||
void CXWM::onNewResource(SP<CXWaylandSurfaceResource> resource) {
|
||||
|
|
@ -1148,7 +1148,7 @@ void CXWM::associate(SP<CXWaylandSurface> surf, SP<CWLSurfaceResource> wlSurf) {
|
|||
auto existing = std::ranges::find_if(m_surfaces, [wlSurf](const auto& e) { return e->m_surface == wlSurf; });
|
||||
|
||||
if (existing != m_surfaces.end()) {
|
||||
Log::logger->log(Log::WARN, "[xwm] associate() called but surface is already associated to {:x}, ignoring...", rc<uintptr_t>(surf.get()));
|
||||
Log::logger->log(Log::WARN, "[xwm] associate() called but surface is already associated to {:x}, ignoring...", rc<uintptr_t>(surf.get()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1454,7 +1454,7 @@ int SXSelection::onRead(int fd, uint32_t mask) {
|
|||
|
||||
if (bytesRead == 0) {
|
||||
if (transfer->data.empty()) {
|
||||
Log::logger->log(Log::WARN, "[xwm] Transfer ended with zero bytes — rejecting");
|
||||
Log::logger->log(Log::WARN, "[xwm] Transfer ended with zero bytes — rejecting");
|
||||
g_pXWayland->m_wm->selectionSendNotify(&transfer->request, false);
|
||||
transfers.erase(it);
|
||||
return 0;
|
||||
|
|
@ -1513,7 +1513,7 @@ bool SXSelection::sendData(xcb_selection_request_event_t* e, std::string mime) {
|
|||
if (mime.contains('/'))
|
||||
needle = mime.substr(0, mime.find('/'));
|
||||
|
||||
Log::logger->log(Log::TRACE, "[xwm] X MIME needle '{}'", needle);
|
||||
Log::logger->log(Log::TRACE, "[xwm] X MIME needle '{}'", needle);
|
||||
|
||||
if (Env::isTrace()) {
|
||||
std::string mimeList = "";
|
||||
|
|
@ -1524,7 +1524,7 @@ bool SXSelection::sendData(xcb_selection_request_event_t* e, std::string mime) {
|
|||
if (!MIMES.empty())
|
||||
mimeList = mimeList.substr(0, mimeList.size() - 2);
|
||||
|
||||
Log::logger->log(Log::TRACE, "[xwm] X MIME supported: {}", mimeList);
|
||||
Log::logger->log(Log::TRACE, "[xwm] X MIME supported: {}", mimeList);
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
|
|
@ -1532,7 +1532,7 @@ bool SXSelection::sendData(xcb_selection_request_event_t* e, std::string mime) {
|
|||
for (const auto& m : MIMES) {
|
||||
if (m.starts_with(needle)) {
|
||||
selectedMime = m;
|
||||
Log::logger->log(Log::TRACE, "[xwm] X MIME needle found type '{}'", m);
|
||||
Log::logger->log(Log::TRACE, "[xwm] X MIME needle found type '{}'", m);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1542,7 +1542,7 @@ bool SXSelection::sendData(xcb_selection_request_event_t* e, std::string mime) {
|
|||
for (const auto& m : MIMES) {
|
||||
if (m.contains(needle)) {
|
||||
selectedMime = m;
|
||||
Log::logger->log(Log::TRACE, "[xwm] X MIME needle found type '{}'", m);
|
||||
Log::logger->log(Log::TRACE, "[xwm] X MIME needle found type '{}'", m);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue