debug: move to hyprutils' logger (#12673)
This commit is contained in:
parent
f88deb928a
commit
6175ecd4c4
147 changed files with 1696 additions and 1709 deletions
|
|
@ -118,7 +118,7 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SP<SDwindleNodeData> pNode, bool
|
|||
PMONITOR = WS->m_monitor.lock();
|
||||
|
||||
if (!PMONITOR || !WS) {
|
||||
Debug::log(ERR, "Orphaned Node {}!!", pNode);
|
||||
Log::logger->log(Log::ERR, "Orphaned Node {}!!", pNode);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SP<SDwindleNodeData> pNode, bool
|
|||
const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(g_pCompositor->getWorkspaceByID(pNode->workspaceID));
|
||||
|
||||
if (!validMapped(PWINDOW)) {
|
||||
Debug::log(ERR, "Node {} holding invalid {}!!", pNode, PWINDOW);
|
||||
Log::logger->log(Log::ERR, "Node {} holding invalid {}!!", pNode, PWINDOW);
|
||||
onWindowRemovedTiling(PWINDOW);
|
||||
return;
|
||||
}
|
||||
|
|
@ -316,7 +316,7 @@ void CHyprDwindleLayout::onWindowCreatedTiling(PHLWINDOW pWindow, eDirection dir
|
|||
} else
|
||||
OPENINGON = getFirstNodeOnWorkspace(pWindow->workspaceID());
|
||||
|
||||
Debug::log(LOG, "OPENINGON: {}, Monitor: {}", OPENINGON, PMONITOR->m_id);
|
||||
Log::logger->log(Log::DEBUG, "OPENINGON: {}, Monitor: {}", OPENINGON, PMONITOR->m_id);
|
||||
|
||||
if (OPENINGON && OPENINGON->workspaceID != PNODE->workspaceID) {
|
||||
// special workspace handling
|
||||
|
|
@ -489,7 +489,7 @@ void CHyprDwindleLayout::onWindowRemovedTiling(PHLWINDOW pWindow) {
|
|||
const auto PNODE = getNodeFromWindow(pWindow);
|
||||
|
||||
if (!PNODE) {
|
||||
Debug::log(ERR, "onWindowRemovedTiling node null?");
|
||||
Log::logger->log(Log::ERR, "onWindowRemovedTiling node null?");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ void CHyprDwindleLayout::onWindowRemovedTiling(PHLWINDOW pWindow) {
|
|||
const auto PPARENT = PNODE->pParent;
|
||||
|
||||
if (!PPARENT) {
|
||||
Debug::log(LOG, "Removing last node (dwindle)");
|
||||
Log::logger->log(Log::DEBUG, "Removing last node (dwindle)");
|
||||
std::erase(m_dwindleNodesData, PNODE);
|
||||
return;
|
||||
}
|
||||
|
|
@ -1015,7 +1015,7 @@ std::any CHyprDwindleLayout::layoutMessage(SLayoutMessageHeader header, std::str
|
|||
std::string direction = ARGS[1];
|
||||
|
||||
if (direction.empty()) {
|
||||
Debug::log(ERR, "Expected direction for preselect");
|
||||
Log::logger->log(Log::ERR, "Expected direction for preselect");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ void IHyprLayout::onWindowCreated(PHLWINDOW pWindow, eDirection direction) {
|
|||
const auto STOREDSIZE = HASPERSISTENTSIZE ? g_pConfigManager->getStoredFloatingSize(pWindow) : std::nullopt;
|
||||
|
||||
if (STOREDSIZE.has_value()) {
|
||||
Debug::log(LOG, "using stored size {}x{} for new window {}::{}", STOREDSIZE->x, STOREDSIZE->y, pWindow->m_class, pWindow->m_title);
|
||||
Log::logger->log(Log::DEBUG, "using stored size {}x{} for new window {}::{}", STOREDSIZE->x, STOREDSIZE->y, pWindow->m_class, pWindow->m_title);
|
||||
pWindow->m_lastFloatingSize = STOREDSIZE.value();
|
||||
} else if (desiredGeometry.width <= 5 || desiredGeometry.height <= 5) {
|
||||
const auto PMONITOR = pWindow->m_monitor.lock();
|
||||
|
|
@ -117,7 +117,7 @@ void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {
|
|||
static auto PXWLFORCESCALEZERO = CConfigValue<Hyprlang::INT>("xwayland:force_zero_scaling");
|
||||
|
||||
if (!PMONITOR) {
|
||||
Debug::log(ERR, "{:m} has an invalid monitor in onWindowCreatedFloating!!!", pWindow);
|
||||
Log::logger->log(Log::ERR, "{:m} has an invalid monitor in onWindowCreatedFloating!!!", pWindow);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -248,7 +248,7 @@ void IHyprLayout::onBeginDragWindow() {
|
|||
|
||||
// Window will be floating. Let's check if it's valid. It should be, but I don't like crashing.
|
||||
if (!validMapped(DRAGGINGWINDOW)) {
|
||||
Debug::log(ERR, "Dragging attempted on an invalid window!");
|
||||
Log::logger->log(Log::ERR, "Dragging attempted on an invalid window!");
|
||||
CKeybindManager::changeMouseBindMode(MBIND_INVALID);
|
||||
return;
|
||||
}
|
||||
|
|
@ -745,7 +745,7 @@ void IHyprLayout::onMouseMove(const Vector2D& mousePos) {
|
|||
void IHyprLayout::changeWindowFloatingMode(PHLWINDOW pWindow) {
|
||||
|
||||
if (pWindow->isFullscreen()) {
|
||||
Debug::log(LOG, "changeWindowFloatingMode: fullscreen");
|
||||
Log::logger->log(Log::DEBUG, "changeWindowFloatingMode: fullscreen");
|
||||
g_pCompositor->setWindowFullscreenInternal(pWindow, FSMODE_NONE);
|
||||
}
|
||||
|
||||
|
|
@ -864,7 +864,7 @@ void IHyprLayout::moveActiveWindow(const Vector2D& delta, PHLWINDOW pWindow) {
|
|||
return;
|
||||
|
||||
if (!PWINDOW->m_isFloating) {
|
||||
Debug::log(LOG, "Dwindle cannot move a tiled window in moveActiveWindow!");
|
||||
Log::logger->log(Log::DEBUG, "Dwindle cannot move a tiled window in moveActiveWindow!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -970,7 +970,7 @@ Vector2D IHyprLayout::predictSizeForNewWindowFloating(PHLWINDOW pWindow) { // ge
|
|||
const auto STOREDSIZE = HASPERSISTENTSIZE ? g_pConfigManager->getStoredFloatingSize(pWindow) : std::nullopt;
|
||||
|
||||
if (STOREDSIZE.has_value()) {
|
||||
Debug::log(LOG, "using stored size {}x{} for new floating window {}::{}", STOREDSIZE->x, STOREDSIZE->y, pWindow->m_class, pWindow->m_title);
|
||||
Log::logger->log(Log::DEBUG, "using stored size {}x{} for new floating window {}::{}", STOREDSIZE->x, STOREDSIZE->y, pWindow->m_class, pWindow->m_title);
|
||||
return STOREDSIZE.value();
|
||||
}
|
||||
|
||||
|
|
@ -1008,14 +1008,14 @@ bool IHyprLayout::updateDragWindow() {
|
|||
|
||||
if (g_pInputManager->m_dragThresholdReached) {
|
||||
if (WAS_FULLSCREEN) {
|
||||
Debug::log(LOG, "Dragging a fullscreen window");
|
||||
Log::logger->log(Log::DEBUG, "Dragging a fullscreen window");
|
||||
g_pCompositor->setWindowFullscreenInternal(DRAGGINGWINDOW, FSMODE_NONE);
|
||||
}
|
||||
|
||||
const auto PWORKSPACE = DRAGGINGWINDOW->m_workspace;
|
||||
|
||||
if (PWORKSPACE->m_hasFullscreenWindow && (!DRAGGINGWINDOW->m_isFloating || (!DRAGGINGWINDOW->m_createdOverFullscreen && !DRAGGINGWINDOW->m_pinned))) {
|
||||
Debug::log(LOG, "Rejecting drag on a fullscreen workspace. (window under fullscreen)");
|
||||
Log::logger->log(Log::DEBUG, "Rejecting drag on a fullscreen workspace. (window under fullscreen)");
|
||||
g_pKeybindManager->changeMouseBindMode(MBIND_INVALID);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -649,7 +649,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
|
|||
PMONITOR = WS->m_monitor.lock();
|
||||
|
||||
if (!PMONITOR || !WS) {
|
||||
Debug::log(ERR, "Orphaned Node {}!!", pNode);
|
||||
Log::logger->log(Log::ERR, "Orphaned Node {}!!", pNode);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -678,7 +678,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
|
|||
auto gapsIn = WORKSPACERULE.gapsIn.value_or(*PGAPSIN);
|
||||
|
||||
if (!validMapped(PWINDOW)) {
|
||||
Debug::log(ERR, "Node {} holding invalid {}!!", pNode, PWINDOW);
|
||||
Log::logger->log(Log::ERR, "Node {} holding invalid {}!!", pNode, PWINDOW);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1092,7 +1092,7 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri
|
|||
CVarList vars(message, 0, ' ');
|
||||
|
||||
if (vars.size() < 1 || vars[0].empty()) {
|
||||
Debug::log(ERR, "layoutmsg called without params");
|
||||
Log::logger->log(Log::ERR, "layoutmsg called without params");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue