From 6175ecd4c4ba817c4620f66a75e1e11da7c7a8ca Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Thu, 18 Dec 2025 17:23:24 +0000 Subject: debug: move to hyprutils' logger (#12673) --- src/layout/IHyprLayout.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/layout/IHyprLayout.cpp') diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 73f9d853..8a33928b 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -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("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; } -- cgit v1.2.3