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/desktop/state/FocusState.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/desktop/state/FocusState.cpp') diff --git a/src/desktop/state/FocusState.cpp b/src/desktop/state/FocusState.cpp index 1bb231aa..ea869398 100644 --- a/src/desktop/state/FocusState.cpp +++ b/src/desktop/state/FocusState.cpp @@ -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 surf static auto PMODALPARENTBLOCKING = CConfigValue("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 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 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 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(pSurface.get())); + Log::logger->log(Log::DEBUG, "surface {:x} won't receive kb focus because grab rejected it", rc(pSurface.get())); return; } @@ -257,9 +257,9 @@ void CFocusState::rawSurfaceFocus(SP pSurface, PHLWINDOW pWi g_pSeatManager->setKeyboardFocus(pSurface); if (pWindowOwner) - Debug::log(LOG, "Set keyboard focus to surface {:x}, with {}", rc(pSurface.get()), pWindowOwner); + Log::logger->log(Log::DEBUG, "Set keyboard focus to surface {:x}, with {}", rc(pSurface.get()), pWindowOwner); else - Debug::log(LOG, "Set keyboard focus to surface {:x}", rc(pSurface.get())); + Log::logger->log(Log::DEBUG, "Set keyboard focus to surface {:x}", rc(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); } -- cgit v1.2.3