debug: move to hyprutils' logger (#12673)

This commit is contained in:
Vaxry 2025-12-18 17:23:24 +00:00 committed by GitHub
parent f88deb928a
commit 6175ecd4c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
147 changed files with 1696 additions and 1709 deletions

View file

@ -60,7 +60,7 @@ SWorkspaceIDName CWorkspace::getPrevWorkspaceIDName() const {
}
CWorkspace::~CWorkspace() {
Debug::log(LOG, "Destroying workspace ID {}", m_id);
Log::logger->log(Log::DEBUG, "Destroying workspace ID {}", m_id);
// check if g_pHookSystem and g_pEventManager exist, they might be destroyed as in when the compositor is closing.
if (g_pHookSystem)
@ -90,7 +90,7 @@ void CWorkspace::rememberPrevWorkspace(const PHLWORKSPACE& prev) {
}
if (prev->m_id == m_id) {
Debug::log(LOG, "Tried to set prev workspace to the same as current one");
Log::logger->log(Log::DEBUG, "Tried to set prev workspace to the same as current one");
return;
}
@ -156,14 +156,14 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
if (cur == 'r') {
WORKSPACEID from = 0, to = 0;
if (!prop.starts_with("r[") || !prop.ends_with("]")) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
prop = prop.substr(2, prop.length() - 3);
if (!prop.contains("-")) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -171,7 +171,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
const auto LHS = prop.substr(0, DASHPOS), RHS = prop.substr(DASHPOS + 1);
if (!isNumber(LHS) || !isNumber(RHS)) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -179,12 +179,12 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
from = std::stoll(LHS);
to = std::stoll(RHS);
} catch (std::exception& e) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
if (to < from || to < 1 || from < 1) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -195,7 +195,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
if (cur == 's') {
if (!prop.starts_with("s[") || !prop.ends_with("]")) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -210,7 +210,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
if (cur == 'm') {
if (!prop.starts_with("m[") || !prop.ends_with("]")) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -225,7 +225,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
if (cur == 'n') {
if (!prop.starts_with("n[") || !prop.ends_with("]")) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -246,7 +246,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
if (cur == 'w') {
WORKSPACEID from = 0, to = 0;
if (!prop.starts_with("w[") || !prop.ends_with("]")) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -284,14 +284,14 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
// try single
if (!isNumber(prop)) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
try {
from = std::stoll(prop);
} catch (std::exception& e) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -314,7 +314,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
const auto LHS = prop.substr(0, DASHPOS), RHS = prop.substr(DASHPOS + 1);
if (!isNumber(LHS) || !isNumber(RHS)) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -322,12 +322,12 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
from = std::stoll(LHS);
to = std::stoll(RHS);
} catch (std::exception& e) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
if (to < from || to < 1 || from < 1) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -348,7 +348,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
if (cur == 'f') {
if (!prop.starts_with("f[") || !prop.ends_with("]")) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -357,7 +357,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
try {
FSSTATE = std::stoi(prop);
} catch (std::exception& e) {
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -379,7 +379,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
continue;
}
Debug::log(LOG, "Invalid selector {}", selector);
Log::logger->log(Log::DEBUG, "Invalid selector {}", selector);
return false;
}
@ -522,7 +522,7 @@ void CWorkspace::rename(const std::string& name) {
if (g_pCompositor->isWorkspaceSpecial(m_id))
return;
Debug::log(LOG, "CWorkspace::rename: Renaming workspace {} to '{}'", m_id, name);
Log::logger->log(Log::DEBUG, "CWorkspace::rename: Renaming workspace {} to '{}'", m_id, name);
m_name = name;
const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(m_self.lock());

View file

@ -1,5 +1,5 @@
#include "Rule.hpp"
#include "../../debug/Log.hpp"
#include "../../debug/log/Logger.hpp"
#include <re2/re2.h>
#include "matchEngine/RegexMatchEngine.hpp"
@ -84,7 +84,7 @@ IRule::IRule(const std::string& name) : m_name(name) {
void IRule::registerMatch(eRuleProperty p, const std::string& s) {
if (!RULE_ENGINES.contains(p)) {
Debug::log(ERR, "BUG THIS: IRule: RULE_ENGINES does not contain rule idx {}", sc<std::underlying_type_t<eRuleProperty>>(p));
Log::logger->log(Log::ERR, "BUG THIS: IRule: RULE_ENGINES does not contain rule idx {}", sc<std::underlying_type_t<eRuleProperty>>(p));
return;
}

View file

@ -1,5 +1,5 @@
#include "LayerRule.hpp"
#include "../../../debug/Log.hpp"
#include "../../../debug/log/Logger.hpp"
#include "../../view/LayerSurface.hpp"
using namespace Desktop;
@ -28,7 +28,7 @@ bool CLayerRule::matches(PHLLS ls) {
for (const auto& [prop, engine] : m_matchEngines) {
switch (prop) {
default: {
Debug::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;
}

View file

@ -38,7 +38,7 @@ void CLayerRuleApplicator::applyDynamicRule(const SP<CLayerRule>& rule) {
for (const auto& [key, effect] : rule->effects()) {
switch (key) {
case LAYER_RULE_EFFECT_NONE: {
Debug::log(ERR, "CLayerRuleApplicator::applyDynamicRule: BUG THIS: LAYER_RULE_EFFECT_NONE??");
Log::logger->log(Log::ERR, "CLayerRuleApplicator::applyDynamicRule: BUG THIS: LAYER_RULE_EFFECT_NONE??");
break;
}
case LAYER_RULE_EFFECT_NO_ANIM: {
@ -75,21 +75,21 @@ void CLayerRuleApplicator::applyDynamicRule(const SP<CLayerRule>& rule) {
try {
m_noScreenShare.first.set(std::stoi(effect), Types::PRIORITY_WINDOW_RULE);
m_noScreenShare.second |= rule->getPropertiesMask();
} catch (...) { Debug::log(ERR, "CLayerRuleApplicator::applyDynamicRule: invalid order {}", effect); }
} catch (...) { Log::logger->log(Log::ERR, "CLayerRuleApplicator::applyDynamicRule: invalid order {}", effect); }
break;
}
case LAYER_RULE_EFFECT_ABOVE_LOCK: {
try {
m_aboveLock.first.set(std::clamp(std::stoull(effect), 0ULL, 2ULL), Types::PRIORITY_WINDOW_RULE);
m_aboveLock.second |= rule->getPropertiesMask();
} catch (...) { Debug::log(ERR, "CLayerRuleApplicator::applyDynamicRule: invalid order {}", effect); }
} catch (...) { Log::logger->log(Log::ERR, "CLayerRuleApplicator::applyDynamicRule: invalid order {}", effect); }
break;
}
case LAYER_RULE_EFFECT_IGNORE_ALPHA: {
try {
m_ignoreAlpha.first.set(std::clamp(std::stof(effect), 0.F, 1.F), Types::PRIORITY_WINDOW_RULE);
m_ignoreAlpha.second |= rule->getPropertiesMask();
} catch (...) { Debug::log(ERR, "CLayerRuleApplicator::applyDynamicRule: invalid order {}", effect); }
} catch (...) { Log::logger->log(Log::ERR, "CLayerRuleApplicator::applyDynamicRule: invalid order {}", effect); }
break;
}
case LAYER_RULE_EFFECT_ANIMATION: {

View file

@ -1,12 +1,12 @@
#include "IntMatchEngine.hpp"
#include "../../../debug/Log.hpp"
#include "../../../debug/log/Logger.hpp"
using namespace Desktop::Rule;
CIntMatchEngine::CIntMatchEngine(const std::string& s) {
try {
m_value = std::stoi(s);
} catch (...) { Debug::log(ERR, "CIntMatchEngine: invalid input {}", s); }
} catch (...) { Log::logger->log(Log::ERR, "CIntMatchEngine: invalid input {}", s); }
}
bool CIntMatchEngine::match(int other) {

View file

@ -32,7 +32,7 @@ bool CWindowRule::matches(PHLWINDOW w, bool allowEnvLookup) {
for (const auto& [prop, engine] : m_matchEngines) {
switch (prop) {
default: {
Debug::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;
}

View file

@ -96,7 +96,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
switch (key) {
default: {
if (key <= WINDOW_RULE_EFFECT_LAST_STATIC) {
Debug::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;
}
@ -118,21 +118,21 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
}
case WINDOW_RULE_EFFECT_NONE: {
Debug::log(ERR, "CWindowRuleApplicator::applyDynamicRule: BUG THIS: WINDOW_RULE_EFFECT_NONE??");
Log::logger->log(Log::ERR, "CWindowRuleApplicator::applyDynamicRule: BUG THIS: WINDOW_RULE_EFFECT_NONE??");
break;
}
case WINDOW_RULE_EFFECT_ROUNDING: {
try {
m_rounding.first.set(std::stoull(effect), Types::PRIORITY_WINDOW_RULE);
m_rounding.second |= rule->getPropertiesMask();
} catch (...) { Debug::log(ERR, "CWindowRuleApplicator::applyDynamicRule: invalid rounding {}", effect); }
} catch (...) { Log::logger->log(Log::ERR, "CWindowRuleApplicator::applyDynamicRule: invalid rounding {}", effect); }
break;
}
case WINDOW_RULE_EFFECT_ROUNDING_POWER: {
try {
m_roundingPower.first.set(std::clamp(std::stof(effect), 1.F, 10.F), Types::PRIORITY_WINDOW_RULE);
m_roundingPower.second |= rule->getPropertiesMask();
} catch (...) { Debug::log(ERR, "CWindowRuleApplicator::applyDynamicRule: invalid rounding_power {}", effect); }
} catch (...) { Log::logger->log(Log::ERR, "CWindowRuleApplicator::applyDynamicRule: invalid rounding_power {}", effect); }
break;
}
case WINDOW_RULE_EFFECT_PERSISTENT_SIZE: {
@ -179,16 +179,16 @@ 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)
Debug::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())
Debug::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 {
m_activeBorderColor.first = Types::COverridableVar(activeBorderGradient, Types::PRIORITY_WINDOW_RULE);
m_inactiveBorderColor.first = Types::COverridableVar(inactiveBorderGradient, Types::PRIORITY_WINDOW_RULE);
}
} catch (std::exception& e) { Debug::log(ERR, "BorderColor rule \"{}\" failed with: {}", effect, e.what()); }
} catch (std::exception& e) { Log::logger->log(Log::ERR, "BorderColor rule \"{}\" failed with: {}", effect, e.what()); }
m_activeBorderColor.second = rule->getPropertiesMask();
m_inactiveBorderColor.second = rule->getPropertiesMask();
break;
@ -203,7 +203,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
else if (effect == "fullscreen")
m_idleInhibitMode.first.set(IDLEINHIBIT_FULLSCREEN, Types::PRIORITY_WINDOW_RULE);
else
Debug::log(ERR, "Rule idleinhibit: unknown mode {}", effect);
Log::logger->log(Log::ERR, "Rule idleinhibit: unknown mode {}", effect);
m_idleInhibitMode.second = rule->getPropertiesMask();
break;
}
@ -246,7 +246,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
m_alphaInactive.first = m_alpha.first;
m_alphaFullscreen.first = m_alpha.first;
}
} catch (std::exception& e) { Debug::log(ERR, "Opacity rule \"{}\" failed with: {}", effect, e.what()); }
} catch (std::exception& e) { Log::logger->log(Log::ERR, "Opacity rule \"{}\" failed with: {}", effect, e.what()); }
m_alpha.second = rule->getPropertiesMask();
m_alphaInactive.second = rule->getPropertiesMask();
m_alphaFullscreen.second = rule->getPropertiesMask();
@ -270,14 +270,14 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
const auto VEC = configStringToVector2D(effect);
if (VEC.x < 1 || VEC.y < 1) {
Debug::log(ERR, "Invalid size for maxsize");
Log::logger->log(Log::ERR, "Invalid size for maxsize");
break;
}
m_maxSize.first = Types::COverridableVar(VEC, Types::PRIORITY_WINDOW_RULE);
m_window->clampWindowSize(std::nullopt, m_maxSize.first.value());
} catch (std::exception& e) { Debug::log(ERR, "maxsize rule \"{}\" failed with: {}", effect, e.what()); }
} catch (std::exception& e) { Log::logger->log(Log::ERR, "maxsize rule \"{}\" failed with: {}", effect, e.what()); }
m_maxSize.second = rule->getPropertiesMask();
break;
}
@ -293,13 +293,13 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
const auto VEC = configStringToVector2D(effect);
if (VEC.x < 1 || VEC.y < 1) {
Debug::log(ERR, "Invalid size for maxsize");
Log::logger->log(Log::ERR, "Invalid size for maxsize");
break;
}
m_minSize.first = Types::COverridableVar(VEC, Types::PRIORITY_WINDOW_RULE);
m_window->clampWindowSize(std::nullopt, m_minSize.first.value());
} catch (std::exception& e) { Debug::log(ERR, "minsize rule \"{}\" failed with: {}", effect, e.what()); }
} catch (std::exception& e) { Log::logger->log(Log::ERR, "minsize rule \"{}\" failed with: {}", effect, e.what()); }
m_minSize.second = rule->getPropertiesMask();
break;
}
@ -310,7 +310,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
m_borderSize.second |= rule->getPropertiesMask();
if (oldBorderSize != m_borderSize.first.valueOrDefault())
result.needsRelayout = true;
} catch (...) { Debug::log(ERR, "CWindowRuleApplicator::applyDynamicRule: invalid border_size {}", effect); }
} catch (...) { Log::logger->log(Log::ERR, "CWindowRuleApplicator::applyDynamicRule: invalid border_size {}", effect); }
break;
}
case WINDOW_RULE_EFFECT_ALLOWS_INPUT: {
@ -432,14 +432,14 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyDynamicRule(const
try {
m_scrollMouse.first.set(std::clamp(std::stof(effect), 0.01F, 10.F), Types::PRIORITY_WINDOW_RULE);
m_scrollMouse.second |= rule->getPropertiesMask();
} catch (...) { Debug::log(ERR, "CWindowRuleApplicator::applyDynamicRule: invalid scroll_mouse {}", effect); }
} catch (...) { Log::logger->log(Log::ERR, "CWindowRuleApplicator::applyDynamicRule: invalid scroll_mouse {}", effect); }
break;
}
case WINDOW_RULE_EFFECT_SCROLL_TOUCHPAD: {
try {
m_scrollTouchpad.first.set(std::clamp(std::stof(effect), 0.01F, 10.F), Types::PRIORITY_WINDOW_RULE);
m_scrollTouchpad.second |= rule->getPropertiesMask();
} catch (...) { Debug::log(ERR, "CWindowRuleApplicator::applyDynamicRule: invalid scroll_touchpad {}", effect); }
} catch (...) { Log::logger->log(Log::ERR, "CWindowRuleApplicator::applyDynamicRule: invalid scroll_touchpad {}", effect); }
break;
}
}
@ -451,7 +451,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyStaticRule(const
for (const auto& [key, effect] : rule->effects()) {
switch (key) {
default: {
Debug::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;
}
@ -477,7 +477,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyStaticRule(const
static_.fullscreenStateInternal = std::stoi(std::string{vars[0]});
if (!vars[1].empty())
static_.fullscreenStateClient = std::stoi(std::string{vars[1]});
} catch (...) { Debug::log(ERR, "CWindowRuleApplicator::applyStaticRule: invalid fullscreen state {}", effect); }
} catch (...) { Log::logger->log(Log::ERR, "CWindowRuleApplicator::applyStaticRule: invalid fullscreen state {}", effect); }
break;
}
case WINDOW_RULE_EFFECT_MOVE: {
@ -532,7 +532,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyStaticRule(const
case WINDOW_RULE_EFFECT_NOCLOSEFOR: {
try {
static_.noCloseFor = std::stoi(effect);
} catch (...) { Debug::log(ERR, "CWindowRuleApplicator::applyStaticRule: invalid no close for {}", effect); }
} catch (...) { Log::logger->log(Log::ERR, "CWindowRuleApplicator::applyStaticRule: invalid no close for {}", effect); }
break;
}
}

View file

@ -67,7 +67,7 @@ static SFullscreenWorkspaceFocusResult onFullscreenWorkspaceFocusWindow(PHLWINDO
g_pCompositor->setWindowFullscreenInternal(pWindow, FSMODE);
break;
default: Debug::log(ERR, "Invalid misc:on_focus_under_fullscreen mode: {}", *PONFOCUSUNDERFS); break;
default: Log::logger->log(Log::ERR, "Invalid misc:on_focus_under_fullscreen mode: {}", *PONFOCUSUNDERFS); break;
}
return {};
@ -89,7 +89,7 @@ void CFocusState::fullWindowFocus(PHLWINDOW pWindow, SP<CWLSurfaceResource> surf
static auto PMODALPARENTBLOCKING = CConfigValue<Hyprlang::INT>("general:modal_parent_blocking");
if (*PMODALPARENTBLOCKING && pWindow && pWindow->m_xdgSurface && pWindow->m_xdgSurface->m_toplevel && pWindow->m_xdgSurface->m_toplevel->anyChildModal()) {
Debug::log(LOG, "Refusing focus to window shadowed by modal dialog");
Log::logger->log(Log::DEBUG, "Refusing focus to window shadowed by modal dialog");
return;
}
@ -102,12 +102,12 @@ void CFocusState::rawWindowFocus(PHLWINDOW pWindow, SP<CWLSurfaceResource> surfa
if (!pWindow || !pWindow->priorityFocus()) {
if (g_pSessionLockManager->isSessionLocked()) {
Debug::log(LOG, "Refusing a keyboard focus to a window because of a sessionlock");
Log::logger->log(Log::DEBUG, "Refusing a keyboard focus to a window because of a sessionlock");
return;
}
if (!g_pInputManager->m_exclusiveLSes.empty()) {
Debug::log(LOG, "Refusing a keyboard focus to a window because of an exclusive ls");
Log::logger->log(Log::DEBUG, "Refusing a keyboard focus to a window because of an exclusive ls");
return;
}
}
@ -148,7 +148,7 @@ void CFocusState::rawWindowFocus(PHLWINDOW pWindow, SP<CWLSurfaceResource> surfa
}
if (pWindow->m_ruleApplicator->noFocus().valueOrDefault()) {
Debug::log(LOG, "Ignoring focus to nofocus window!");
Log::logger->log(Log::DEBUG, "Ignoring focus to nofocus window!");
return;
}
@ -234,7 +234,7 @@ void CFocusState::rawSurfaceFocus(SP<CWLSurfaceResource> pSurface, PHLWINDOW pWi
return;
if (g_pSeatManager->m_seatGrab && !g_pSeatManager->m_seatGrab->accepts(pSurface)) {
Debug::log(LOG, "surface {:x} won't receive kb focus because grab rejected it", rc<uintptr_t>(pSurface.get()));
Log::logger->log(Log::DEBUG, "surface {:x} won't receive kb focus because grab rejected it", rc<uintptr_t>(pSurface.get()));
return;
}
@ -257,9 +257,9 @@ void CFocusState::rawSurfaceFocus(SP<CWLSurfaceResource> pSurface, PHLWINDOW pWi
g_pSeatManager->setKeyboardFocus(pSurface);
if (pWindowOwner)
Debug::log(LOG, "Set keyboard focus to surface {:x}, with {}", rc<uintptr_t>(pSurface.get()), pWindowOwner);
Log::logger->log(Log::DEBUG, "Set keyboard focus to surface {:x}, with {}", rc<uintptr_t>(pSurface.get()), pWindowOwner);
else
Debug::log(LOG, "Set keyboard focus to surface {:x}", rc<uintptr_t>(pSurface.get()));
Log::logger->log(Log::DEBUG, "Set keyboard focus to surface {:x}", rc<uintptr_t>(pSurface.get()));
g_pXWaylandManager->activateSurface(pSurface, true);
m_focusSurface = pSurface;
@ -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())
Debug::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);
}

View file

@ -24,7 +24,7 @@ PHLLS CLayerSurface::create(SP<CLayerShellResource> resource) {
pLS->m_wlSurface->assign(resource->m_surface.lock(), pLS);
if (!pMonitor) {
Debug::log(ERR, "New LS has no monitor??");
Log::logger->log(Log::ERR, "New LS has no monitor??");
return pLS;
}
@ -50,8 +50,8 @@ PHLLS CLayerSurface::create(SP<CLayerShellResource> resource) {
pLS->m_alpha->setValueAndWarp(0.f);
Debug::log(LOG, "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;
}
@ -116,19 +116,19 @@ bool CLayerSurface::desktopComponent() const {
}
void CLayerSurface::onDestroy() {
Debug::log(LOG, "LayerSurface {:x} destroyed", rc<uintptr_t>(m_layerSurface.get()));
Log::logger->log(Log::DEBUG, "LayerSurface {:x} destroyed", rc<uintptr_t>(m_layerSurface.get()));
const auto PMONITOR = m_monitor.lock();
if (!PMONITOR)
Debug::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) {
Debug::log(LOG, "Forcing an unmap of a LS that did a straight destroy!");
Log::logger->log(Log::DEBUG, "Forcing an unmap of a LS that did a straight destroy!");
onUnmap();
} else {
Debug::log(LOG, "Removing LayerSurface that wasn't mapped.");
Log::logger->log(Log::DEBUG, "Removing LayerSurface that wasn't mapped.");
if (m_alpha)
g_pDesktopAnimationManager->startAnimation(m_self.lock(), CDesktopAnimationManager::ANIMATION_TYPE_OUT);
m_fadingOut = true;
@ -162,7 +162,7 @@ void CLayerSurface::onDestroy() {
}
void CLayerSurface::onMap() {
Debug::log(LOG, "LayerSurface {:x} mapped", rc<uintptr_t>(m_layerSurface.get()));
Log::logger->log(Log::DEBUG, "LayerSurface {:x} mapped", rc<uintptr_t>(m_layerSurface.get()));
m_mapped = true;
m_interactivity = m_layerSurface->m_current.interactivity;
@ -229,7 +229,7 @@ void CLayerSurface::onMap() {
}
void CLayerSurface::onUnmap() {
Debug::log(LOG, "LayerSurface {:x} unmapped", rc<uintptr_t>(m_layerSurface.get()));
Log::logger->log(Log::DEBUG, "LayerSurface {:x} unmapped", rc<uintptr_t>(m_layerSurface.get()));
g_pEventManager->postEvent(SHyprIPCEvent{.event = "closelayer", .data = m_layerSurface->m_layerNamespace});
EMIT_HOOK_EVENT("closeLayer", m_self.lock());
@ -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) {
Debug::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());

View file

@ -137,7 +137,7 @@ void CPopup::initAllSignals() {
void CPopup::onNewPopup(SP<CXDGPopupResource> popup) {
const auto& POPUP = m_children.emplace_back(CPopup::create(popup, m_self));
POPUP->m_self = POPUP;
Debug::log(LOG, "New popup at {:x}", rc<uintptr_t>(this));
Log::logger->log(Log::DEBUG, "New popup at {:x}", rc<uintptr_t>(this));
}
void CPopup::onDestroy() {
@ -156,7 +156,7 @@ void CPopup::onDestroy() {
m_listeners.newPopup.reset();
if (m_fadingOut && m_alpha->isBeingAnimated()) {
Debug::log(LOG, "popup {:x}: skipping full destroy, animating", rc<uintptr_t>(this));
Log::logger->log(Log::DEBUG, "popup {:x}: skipping full destroy, animating", rc<uintptr_t>(this));
return;
}
@ -164,7 +164,7 @@ void CPopup::onDestroy() {
}
void CPopup::fullyDestroy() {
Debug::log(LOG, "popup {:x} fully destroying", rc<uintptr_t>(this));
Log::logger->log(Log::DEBUG, "popup {:x} fully destroying", rc<uintptr_t>(this));
g_pHyprRenderer->makeEGLCurrent();
std::erase_if(g_pHyprOpenGL->m_popupFramebuffers, [&](const auto& other) { return other.first.expired() || other.first == m_self; });
@ -203,7 +203,7 @@ void CPopup::onMap() {
m_alpha->setValueAndWarp(0.F);
*m_alpha = 1.F;
Debug::log(LOG, "popup {:x}: mapped", rc<uintptr_t>(this));
Log::logger->log(Log::DEBUG, "popup {:x}: mapped", rc<uintptr_t>(this));
}
void CPopup::onUnmap() {
@ -211,12 +211,12 @@ void CPopup::onUnmap() {
return;
if (!m_resource || !m_resource->m_surface) {
Debug::log(ERR, "CPopup: orphaned (no surface/resource) and unmaps??");
Log::logger->log(Log::ERR, "CPopup: orphaned (no surface/resource) and unmaps??");
onDestroy();
return;
}
Debug::log(LOG, "popup {:x}: unmapped", rc<uintptr_t>(this));
Log::logger->log(Log::DEBUG, "popup {:x}: unmapped", rc<uintptr_t>(this));
// if the popup committed a different size right now, we also need to damage the old size.
const Vector2D MAX_DAMAGE_SIZE = {std::max(m_lastSize.x, m_resource->m_surface->m_surface->m_current.size.x),
@ -271,7 +271,7 @@ void CPopup::onUnmap() {
void CPopup::onCommit(bool ignoreSiblings) {
if (!m_resource || !m_resource->m_surface) {
Debug::log(ERR, "CPopup: orphaned (no surface/resource) and commits??");
Log::logger->log(Log::ERR, "CPopup: orphaned (no surface/resource) and commits??");
onDestroy();
return;
}
@ -286,7 +286,7 @@ void CPopup::onCommit(bool ignoreSiblings) {
static auto PLOGDAMAGE = CConfigValue<Hyprlang::INT>("debug:log_damage");
if (*PLOGDAMAGE)
Debug::log(LOG, "Refusing to commit damage from a subsurface of {} because it's invisible.", m_windowOwner.lock());
Log::logger->log(Log::DEBUG, "Refusing to commit damage from a subsurface of {} because it's invisible.", m_windowOwner.lock());
return;
}
@ -318,7 +318,7 @@ void CPopup::onCommit(bool ignoreSiblings) {
}
void CPopup::onReposition() {
Debug::log(LOG, "Popup {:x} requests reposition", rc<uintptr_t>(this));
Log::logger->log(Log::DEBUG, "Popup {:x} requests reposition", rc<uintptr_t>(this));
m_requestedReposition = true;

View file

@ -142,7 +142,7 @@ void CSubsurface::onCommit() {
static auto PLOGDAMAGE = CConfigValue<Hyprlang::INT>("debug:log_damage");
if (*PLOGDAMAGE)
Debug::log(LOG, "Refusing to commit damage from a subsurface of {} because it's invisible.", m_windowParent.lock());
Log::logger->log(Log::DEBUG, "Refusing to commit damage from a subsurface of {} because it's invisible.", m_windowParent.lock());
return;
}

View file

@ -132,7 +132,7 @@ void CWLSurface::destroy() {
m_resource.reset();
Debug::log(LOG, "CWLSurface {:x} called destroy()", rc<uintptr_t>(this));
Log::logger->log(Log::DEBUG, "CWLSurface {:x} called destroy()", rc<uintptr_t>(this));
}
void CWLSurface::init() {
@ -145,7 +145,7 @@ void CWLSurface::init() {
m_listeners.destroy = m_resource->m_events.destroy.listen([this] { destroy(); });
Debug::log(LOG, "CWLSurface {:x} called init()", rc<uintptr_t>(this));
Log::logger->log(Log::DEBUG, "CWLSurface {:x} called init()", rc<uintptr_t>(this));
}
SP<IView> CWLSurface::view() const {

View file

@ -10,6 +10,7 @@
#include <any>
#include <bit>
#include <fstream>
#include <string_view>
#include "Window.hpp"
#include "LayerSurface.hpp"
@ -719,7 +720,7 @@ void CWindow::applyGroupRules() {
void CWindow::createGroup() {
if (m_groupData.deny) {
Debug::log(LOG, "createGroup: window:{:x},title:{} is denied as a group, ignored", rc<uintptr_t>(this), this->m_title);
Log::logger->log(Log::DEBUG, "createGroup: window:{:x},title:{} is denied as a group, ignored", rc<uintptr_t>(this), this->m_title);
return;
}
@ -747,7 +748,7 @@ void CWindow::createGroup() {
void CWindow::destroyGroup() {
if (m_groupData.pNextWindow == m_self) {
if (m_groupRules & GROUP_SET_ALWAYS) {
Debug::log(LOG, "destoryGroup: window:{:x},title:{} has rule [group set always], ignored", rc<uintptr_t>(this), this->m_title);
Log::logger->log(Log::DEBUG, "destoryGroup: window:{:x},title:{} has rule [group set always], ignored", rc<uintptr_t>(this), this->m_title);
return;
}
m_groupData.pNextWindow.reset();
@ -1305,7 +1306,7 @@ void CWindow::activate(bool force) {
return;
if (!m_isMapped) {
Debug::log(LOG, "Ignoring CWindow::activate focus/warp, window is not mapped yet.");
Log::logger->log(Log::DEBUG, "Ignoring CWindow::activate focus/warp, window is not mapped yet.");
return;
}
@ -1367,7 +1368,7 @@ void CWindow::onUpdateMeta() {
EMIT_HOOK_EVENT("activeWindow", m_self.lock());
}
Debug::log(LOG, "Window {:x} set title to {}", rc<uintptr_t>(this), m_title);
Log::logger->log(Log::DEBUG, "Window {:x} set title to {}", rc<uintptr_t>(this), m_title);
doUpdate = true;
}
@ -1381,7 +1382,7 @@ void CWindow::onUpdateMeta() {
EMIT_HOOK_EVENT("activeWindow", m_self.lock());
}
Debug::log(LOG, "Window {:x} set class to {}", rc<uintptr_t>(this), m_class);
Log::logger->log(Log::DEBUG, "Window {:x} set class to {}", rc<uintptr_t>(this), m_class);
doUpdate = true;
}
@ -1442,7 +1443,7 @@ void CWindow::onResourceChangeX11() {
// could be first assoc and we need to catch the class
onUpdateMeta();
Debug::log(LOG, "xwayland window {:x} -> association to {:x}", rc<uintptr_t>(m_xwaylandSurface.get()), rc<uintptr_t>(m_wlSurface->resource().get()));
Log::logger->log(Log::DEBUG, "xwayland window {:x} -> association to {:x}", rc<uintptr_t>(m_xwaylandSurface.get()), rc<uintptr_t>(m_wlSurface->resource().get()));
}
void CWindow::onX11ConfigureRequest(CBox box) {
@ -1649,8 +1650,8 @@ void CWindow::updateX11SurfaceScale() {
void CWindow::sendWindowSize(bool force) {
const auto PMONITOR = m_monitor.lock();
Debug::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 +1683,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?
Debug::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;
}
@ -1952,13 +1953,13 @@ void CWindow::mapWindow() {
const auto WINDOWENV = getEnv();
if (WINDOWENV.contains("HL_INITIAL_WORKSPACE_TOKEN")) {
const auto SZTOKEN = WINDOWENV.at("HL_INITIAL_WORKSPACE_TOKEN");
Debug::log(LOG, "New window contains HL_INITIAL_WORKSPACE_TOKEN: {}", SZTOKEN);
Log::logger->log(Log::DEBUG, "New window contains HL_INITIAL_WORKSPACE_TOKEN: {}", SZTOKEN);
const auto TOKEN = g_pTokenManager->getToken(SZTOKEN);
if (TOKEN) {
// find workspace and use it
Desktop::View::SInitialWorkspaceToken WS = std::any_cast<Desktop::View::SInitialWorkspaceToken>(TOKEN->m_data);
Debug::log(LOG, "HL_INITIAL_WORKSPACE_TOKEN {} -> {}", SZTOKEN, WS.workspace);
Log::logger->log(Log::DEBUG, "HL_INITIAL_WORKSPACE_TOKEN {} -> {}", SZTOKEN, WS.workspace);
if (g_pCompositor->getWorkspaceByString(WS.workspace) != m_workspace) {
requestedWorkspace = WS.workspace;
@ -2023,10 +2024,10 @@ void CWindow::mapWindow() {
m_workspace = PMONITOR->m_activeSpecialWorkspace ? PMONITOR->m_activeSpecialWorkspace : PMONITOR->m_activeWorkspace;
PWORKSPACE = m_workspace;
Debug::log(LOG, "Rule monitor, applying to {:mw}", m_self.lock());
Log::logger->log(Log::DEBUG, "Rule monitor, applying to {:mw}", m_self.lock());
requestedFSMonitor = MONITOR_INVALID;
} else
Debug::log(ERR, "No monitor in monitor {} rule", MONITORSTR);
Log::logger->log(Log::ERR, "No monitor in monitor {} rule", MONITORSTR);
}
}
@ -2043,7 +2044,7 @@ void CWindow::mapWindow() {
if (JUSTWORKSPACE == PWORKSPACE->m_name || JUSTWORKSPACE == "name:" + PWORKSPACE->m_name)
requestedWorkspace = "";
Debug::log(LOG, "Rule workspace matched by {}, {} applied.", m_self.lock(), m_ruleApplicator->static_.workspace);
Log::logger->log(Log::DEBUG, "Rule workspace matched by {}, {} applied.", m_self.lock(), m_ruleApplicator->static_.workspace);
requestedFSMonitor = MONITOR_INVALID;
}
@ -2072,7 +2073,7 @@ void CWindow::mapWindow() {
else if (var == "fullscreenoutput")
m_suppressedEvents |= Desktop::View::SUPPRESS_FULLSCREEN_OUTPUT;
else
Debug::log(ERR, "Error while parsing suppressevent windowrule: unknown event type {}", var);
Log::logger->log(Log::ERR, "Error while parsing suppressevent windowrule: unknown event type {}", var);
}
}
@ -2117,7 +2118,7 @@ void CWindow::mapWindow() {
else if (vPrev == "lock")
m_groupRules |= Desktop::View::GROUP_LOCK_ALWAYS;
else
Debug::log(ERR, "windowrule `group` does not support `{} always`", vPrev);
Log::logger->log(Log::ERR, "windowrule `group` does not support `{} always`", vPrev);
}
vPrev = v;
}
@ -2200,7 +2201,7 @@ void CWindow::mapWindow() {
m_workspace = PMONITOR->m_activeSpecialWorkspace ? PMONITOR->m_activeSpecialWorkspace : PMONITOR->m_activeWorkspace;
PWORKSPACE = m_workspace;
Debug::log(LOG, "Requested monitor, applying to {:mw}", m_self.lock());
Log::logger->log(Log::DEBUG, "Requested monitor, applying to {:mw}", m_self.lock());
}
if (PWORKSPACE->m_defaultFloating)
@ -2231,7 +2232,7 @@ void CWindow::mapWindow() {
if (!m_ruleApplicator->static_.size.empty()) {
const auto COMPUTED = calculateExpression(m_ruleApplicator->static_.size);
if (!COMPUTED)
Debug::log(ERR, "failed to parse {} as an expression", m_ruleApplicator->static_.size);
Log::logger->log(Log::ERR, "failed to parse {} as an expression", m_ruleApplicator->static_.size);
else {
*m_realSize = *COMPUTED;
setHidden(false);
@ -2241,7 +2242,7 @@ void CWindow::mapWindow() {
if (!m_ruleApplicator->static_.position.empty()) {
const auto COMPUTED = calculateExpression(m_ruleApplicator->static_.position);
if (!COMPUTED)
Debug::log(ERR, "failed to parse {} as an expression", m_ruleApplicator->static_.position);
Log::logger->log(Log::ERR, "failed to parse {} as an expression", m_ruleApplicator->static_.position);
else {
*m_realPosition = *COMPUTED + PMONITOR->m_position;
setHidden(false);
@ -2266,7 +2267,7 @@ void CWindow::mapWindow() {
if (!m_ruleApplicator->static_.size.empty()) {
const auto COMPUTED = calculateExpression(m_ruleApplicator->static_.size);
if (!COMPUTED)
Debug::log(ERR, "failed to parse {} as an expression", m_ruleApplicator->static_.size);
Log::logger->log(Log::ERR, "failed to parse {} as an expression", m_ruleApplicator->static_.size);
else {
setPseudo = true;
m_pseudoSize = *COMPUTED;
@ -2359,7 +2360,7 @@ void CWindow::mapWindow() {
m_firstMap = false;
Debug::log(LOG, "Map request dispatched, monitor {}, window pos: {:5j}, window size: {:5j}", PMONITOR->m_name, m_realPosition->goal(), m_realSize->goal());
Log::logger->log(Log::DEBUG, "Map request dispatched, monitor {}, window pos: {:5j}, window size: {:5j}", PMONITOR->m_name, m_realPosition->goal(), m_realSize->goal());
// emit the hook event here after basic stuff has been initialized
EMIT_HOOK_EVENT("openWindow", m_self.lock());
@ -2398,7 +2399,7 @@ void CWindow::mapWindow() {
}
void CWindow::unmapWindow() {
Debug::log(LOG, "{:c} unmapped", m_self.lock());
Log::logger->log(Log::DEBUG, "{:c} unmapped", m_self.lock());
static auto PEXITRETAINSFS = CConfigValue<Hyprlang::INT>("misc:exit_window_retains_fullscreen");
@ -2406,7 +2407,7 @@ void CWindow::unmapWindow() {
const auto CURRENTFSMODE = m_fullscreenState.internal;
if (!wlSurface()->exists() || !m_isMapped) {
Debug::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;
}
@ -2422,7 +2423,7 @@ void CWindow::unmapWindow() {
EMIT_HOOK_EVENT("closeWindow", m_self.lock());
if (m_isFloating && !m_isX11 && m_ruleApplicator->persistentSize().valueOrDefault()) {
Debug::log(LOG, "storing floating size {}x{} for window {}::{} on close", m_realSize->value().x, m_realSize->value().y, m_class, m_title);
Log::logger->log(Log::DEBUG, "storing floating size {}x{} for window {}::{} on close", m_realSize->value().x, m_realSize->value().y, m_class, m_title);
g_pConfigManager->storeFloatingSize(m_self.lock(), m_realSize->value());
}
@ -2485,7 +2486,7 @@ void CWindow::unmapWindow() {
else
PWINDOWCANDIDATE = g_pLayoutManager->getCurrentLayout()->getNextWindowCandidate(m_self.lock());
Debug::log(LOG, "On closed window, new focused candidate is {}", PWINDOWCANDIDATE);
Log::logger->log(Log::DEBUG, "On closed window, new focused candidate is {}", PWINDOWCANDIDATE);
if (PWINDOWCANDIDATE != Desktop::focusState()->window() && PWINDOWCANDIDATE) {
Desktop::focusState()->fullWindowFocus(PWINDOWCANDIDATE);
@ -2505,7 +2506,7 @@ void CWindow::unmapWindow() {
EMIT_HOOK_EVENT("activeWindow", PHLWINDOW{nullptr});
}
} else {
Debug::log(LOG, "Unmapped was not focused, ignoring a refocus.");
Log::logger->log(Log::DEBUG, "Unmapped was not focused, ignoring a refocus.");
}
m_fadingOut = true;
@ -2533,7 +2534,7 @@ void CWindow::commitWindow() {
if (!m_isX11 && m_xdgSurface->m_initialCommit) {
Vector2D predSize = g_pLayoutManager->getCurrentLayout()->predictSizeForNewWindow(m_self.lock());
Debug::log(LOG, "Layout predicts size {} for {}", predSize, m_self.lock());
Log::logger->log(Log::DEBUG, "Layout predicts size {} for {}", predSize, m_self.lock());
m_xdgSurface->m_toplevel->setSize(predSize);
return;
@ -2594,7 +2595,7 @@ void CWindow::commitWindow() {
}
void CWindow::destroyWindow() {
Debug::log(LOG, "{:c} destroyed, queueing.", m_self.lock());
Log::logger->log(Log::DEBUG, "{:c} destroyed, queueing.", m_self.lock());
if (m_self.lock() == Desktop::focusState()->window()) {
Desktop::focusState()->window().reset();
@ -2612,7 +2613,7 @@ void CWindow::destroyWindow() {
m_xdgSurface.reset();
if (!m_fadingOut) {
Debug::log(LOG, "Unmapped {} removed instantly", m_self.lock());
Log::logger->log(Log::DEBUG, "Unmapped {} removed instantly", m_self.lock());
g_pCompositor->removeWindowFromVectorSafe(m_self.lock()); // most likely X11 unmanaged or sumn
}
@ -2623,11 +2624,11 @@ void CWindow::destroyWindow() {
}
void CWindow::activateX11() {
Debug::log(LOG, "X11 Activate request for window {}", m_self.lock());
Log::logger->log(Log::DEBUG, "X11 Activate request for window {}", m_self.lock());
if (isX11OverrideRedirect()) {
Debug::log(LOG, "Unmanaged X11 {} requests activate", m_self.lock());
Log::logger->log(Log::DEBUG, "Unmanaged X11 {} requests activate", m_self.lock());
if (Desktop::focusState()->window() && Desktop::focusState()->window()->getPID() != getPID())
return;
@ -2669,7 +2670,7 @@ void CWindow::unmanagedSetGeometry() {
if (abs(std::floor(POS.x) - LOGICALPOS.x) > 2 || abs(std::floor(POS.y) - LOGICALPOS.y) > 2 || abs(std::floor(SIZ.x) - m_xwaylandSurface->m_geometry.width) > 2 ||
abs(std::floor(SIZ.y) - m_xwaylandSurface->m_geometry.height) > 2) {
Debug::log(LOG, "Unmanaged window {} requests geometry update to {:j} {:j}", m_self.lock(), LOGICALPOS, m_xwaylandSurface->m_geometry.size());
Log::logger->log(Log::DEBUG, "Unmanaged window {} requests geometry update to {:j} {:j}", m_self.lock(), LOGICALPOS, m_xwaylandSurface->m_geometry.size());
g_pHyprRenderer->damageWindow(m_self.lock());
m_realPosition->setValueAndWarp(Vector2D(LOGICALPOS.x, LOGICALPOS.y));