From 9b2b156197433cad28bb72b8d4ef7242ecddf086 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Fri, 19 Dec 2025 16:24:43 +0000 Subject: [PATCH] all: chase hyprland --- hyprbars/barDeco.cpp | 6 +++--- hyprexpo/overview.cpp | 2 +- hyprscrolling/Scrolling.cpp | 14 +++++++------- hyprwinwrap/main.cpp | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hyprbars/barDeco.cpp b/hyprbars/barDeco.cpp index 77640bf..feb973f 100644 --- a/hyprbars/barDeco.cpp +++ b/hyprbars/barDeco.cpp @@ -207,7 +207,7 @@ void CHyprBar::handleDownEvent(SCallbackInfo& info, std::optionalm_dispatchers["settiled"]("activewindow"); g_pKeybindManager->m_dispatchers["mouse"]("0movewindow"); - Debug::log(LOG, "[hyprbars] Dragging ended on {:x}", (uintptr_t)PWINDOW.get()); + Log::logger->log(Log::DEBUG, "[hyprbars] Dragging ended on {:x}", (uintptr_t)PWINDOW.get()); } m_bDraggingThis = false; @@ -253,7 +253,7 @@ void CHyprBar::handleUpEvent(SCallbackInfo& info) { if (m_bTouchEv) g_pKeybindManager->m_dispatchers["settiled"]("activewindow"); - Debug::log(LOG, "[hyprbars] Dragging ended on {:x}", (uintptr_t)m_pWindow.lock().get()); + Log::logger->log(Log::DEBUG, "[hyprbars] Dragging ended on {:x}", (uintptr_t)m_pWindow.lock().get()); } m_bDragPending = false; @@ -264,7 +264,7 @@ void CHyprBar::handleUpEvent(SCallbackInfo& info) { void CHyprBar::handleMovement() { g_pKeybindManager->m_dispatchers["mouse"]("1movewindow"); m_bDraggingThis = true; - Debug::log(LOG, "[hyprbars] Dragging initiated on {:x}", (uintptr_t)m_pWindow.lock().get()); + Log::logger->log(Log::DEBUG, "[hyprbars] Dragging initiated on {:x}", (uintptr_t)m_pWindow.lock().get()); return; } diff --git a/hyprexpo/overview.cpp b/hyprexpo/overview.cpp index f313379..3b10480 100644 --- a/hyprexpo/overview.cpp +++ b/hyprexpo/overview.cpp @@ -48,7 +48,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn int methodStartID = pMonitor->activeWorkspaceID(); CVarList method{*PMETHOD, 0, 's', true}; if (method.size() < 2) - Debug::log(ERR, "[he] invalid workspace_method"); + Log::logger->log(Log::ERR, "[he] invalid workspace_method"); else { methodCenter = method[0] == "center"; methodStartID = getWorkspaceIDNameFromString(method[1]).id; diff --git a/hyprscrolling/Scrolling.cpp b/hyprscrolling/Scrolling.cpp index 6aa8a16..381ee73 100644 --- a/hyprscrolling/Scrolling.cpp +++ b/hyprscrolling/Scrolling.cpp @@ -277,7 +277,7 @@ void SWorkspaceData::recalculate(bool forceInstant) { static const auto PFSONONE = CConfigValue("plugin:hyprscrolling:fullscreen_on_one_column"); if (!workspace) { - Debug::log(ERR, "[scroller] broken internal state on workspace data"); + Log::logger->log(Log::ERR, "[scroller] broken internal state on workspace data"); return; } @@ -350,7 +350,7 @@ void CScrollingLayout::applyNodeDataToWindow(SP data, bool if (!data || !data->column || !data->column->workspace) { if (!data->overrideWorkspace) { - Debug::log(ERR, "[scroller] broken internal state on workspace (1)"); + Log::logger->log(Log::ERR, "[scroller] broken internal state on workspace (1)"); return; } @@ -362,7 +362,7 @@ void CScrollingLayout::applyNodeDataToWindow(SP data, bool } if (!PMONITOR || !PWORKSPACE) { - Debug::log(ERR, "[scroller] broken internal state on workspace (2)"); + Log::logger->log(Log::ERR, "[scroller] broken internal state on workspace (2)"); return; } @@ -379,7 +379,7 @@ void CScrollingLayout::applyNodeDataToWindow(SP data, bool const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(PWORKSPACE); if (!validMapped(PWINDOW)) { - Debug::log(ERR, "Node {} holding invalid {}!!", (uintptr_t)data.get(), PWINDOW); + Log::logger->log(Log::ERR, "Node {} holding invalid {}!!", (uintptr_t)data.get(), PWINDOW); onWindowRemovedTiling(PWINDOW); return; } @@ -482,7 +482,7 @@ void CScrollingLayout::onEnable() { for (auto& w : widths) { try { m_config.configuredWidths.emplace_back(std::stof(std::string{w})); - } catch (...) { Debug::log(ERR, "scrolling: Failed to parse width {} as float", w); } + } catch (...) { Log::logger->log(Log::ERR, "scrolling: Failed to parse width {} as float", w); } } }); @@ -530,7 +530,7 @@ void CScrollingLayout::onWindowCreatedTiling(PHLWINDOW window, eDirection direct auto workspaceData = dataFor(window->m_workspace); if (!workspaceData) { - Debug::log(LOG, "[scrolling] No workspace data yet, creating"); + Log::logger->log(Log::DEBUG, "[scrolling] No workspace data yet, creating"); workspaceData = m_workspaceDatas.emplace_back(makeShared(window->m_workspace, this)); workspaceData->self = workspaceData; } @@ -543,7 +543,7 @@ void CScrollingLayout::onWindowCreatedTiling(PHLWINDOW window, eDirection direct SP droppingData = droppingOn ? dataFor(droppingOn) : nullptr; SP droppingColumn = droppingData ? droppingData->column.lock() : nullptr; - Debug::log(LOG, "[scrolling] new window {:x}, droppingColumn: {:x}, columns before: {}", (uintptr_t)window.get(), (uintptr_t)droppingColumn.get(), + Log::logger->log(Log::DEBUG, "[scrolling] new window {:x}, droppingColumn: {:x}, columns before: {}", (uintptr_t)window.get(), (uintptr_t)droppingColumn.get(), workspaceData->columns.size()); if (!droppingColumn) { diff --git a/hyprwinwrap/main.cpp b/hyprwinwrap/main.cpp index 5f75880..e2a2962 100644 --- a/hyprwinwrap/main.cpp +++ b/hyprwinwrap/main.cpp @@ -78,11 +78,11 @@ void onNewWindow(PHLWINDOW pWindow) { py = std::clamp(py, 0.f, 100.f); if (px + sx > 100.f) { - Debug::log(WARN, "[hyprwinwrap] size_x (%d) + pos_x (%d) > 100, adjusting size_x to %d", sx, px, 100.f - px); + Log::logger->log(Log::WARN, "[hyprwinwrap] size_x (%d) + pos_x (%d) > 100, adjusting size_x to %d", sx, px, 100.f - px); sx = 100.f - px; } if (py + sy > 100.f) { - Debug::log(WARN, "[hyprwinwrap] size_y (%d) + pos_y (%d) > 100, adjusting size_y to %d", sy, py, 100.f - py); + Log::logger->log(Log::WARN, "[hyprwinwrap] size_y (%d) + pos_y (%d) > 100, adjusting size_y to %d", sy, py, 100.f - py); sy = 100.f - py; } @@ -104,13 +104,13 @@ void onNewWindow(PHLWINDOW pWindow) { pWindow->m_hidden = true; g_pInputManager->refocus(); - Debug::log(LOG, "[hyprwinwrap] new window moved to bg {}", pWindow); + Log::logger->log(Log::DEBUG, "[hyprwinwrap] new window moved to bg {}", pWindow); } void onCloseWindow(PHLWINDOW pWindow) { std::erase_if(bgWindows, [pWindow](const auto& ref) { return ref.expired() || ref.lock() == pWindow; }); - Debug::log(LOG, "[hyprwinwrap] closed window {}", pWindow); + Log::logger->log(Log::DEBUG, "[hyprwinwrap] closed window {}", pWindow); } void onRenderStage(eRenderStage stage) {