From 61a71c65ace5124cb26a074715280537e6e34d00 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Wed, 6 Sep 2023 12:51:36 +0200 Subject: internal: Formatter rework (#3186) --- src/layout/DwindleLayout.cpp | 6 +++--- src/layout/IHyprLayout.cpp | 4 ++-- src/layout/MasterLayout.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/layout') diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 92b81687..4511b9ca 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -104,7 +104,7 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for } if (!PMONITOR) { - Debug::log(ERR, "Orphaned Node %lx (workspace ID: %i)!!", pNode, pNode->workspaceID); + Debug::log(ERR, "Orphaned Node {:x} (workspace ID: {})!!", (uintptr_t)pNode, pNode->workspaceID); return; } @@ -129,7 +129,7 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for auto gapsOut = WORKSPACERULE.gapsOut.value_or(*PGAPSOUT); if (!g_pCompositor->windowExists(PWINDOW) || !PWINDOW->m_bIsMapped) { - Debug::log(ERR, "Node %lx holding invalid window %lx!!", pNode, PWINDOW); + Debug::log(ERR, "Node {:x} holding invalid window {:x}!!", (uintptr_t)pNode, (uintptr_t)PWINDOW); onWindowRemovedTiling(PWINDOW); return; } @@ -270,7 +270,7 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow) { } else OPENINGON = getFirstNodeOnWorkspace(pWindow->m_iWorkspaceID); - Debug::log(LOG, "OPENINGON: %lx, Workspace: %i, Monitor: %i", OPENINGON, PNODE->workspaceID, PMONITOR->ID); + Debug::log(LOG, "OPENINGON: {:x}, Workspace: {}, Monitor: {}", (uintptr_t)OPENINGON, PNODE->workspaceID, PMONITOR->ID); if (OPENINGON && OPENINGON->workspaceID != PNODE->workspaceID) { // special workspace handling diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 80b2d0d4..b4c15ef1 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -89,7 +89,7 @@ void IHyprLayout::onWindowCreatedFloating(CWindow* pWindow) { static auto* const PXWLFORCESCALEZERO = &g_pConfigManager->getConfigValuePtr("xwayland:force_zero_scaling")->intValue; if (!PMONITOR) { - Debug::log(ERR, "Window %lx (%s) has an invalid monitor in onWindowCreatedFloating!!!", pWindow, pWindow->m_szTitle.c_str()); + Debug::log(ERR, "Window {:x} ({}) has an invalid monitor in onWindowCreatedFloating!!!", (uintptr_t)pWindow, pWindow->m_szTitle.c_str()); return; } @@ -402,7 +402,7 @@ void IHyprLayout::changeWindowFloatingMode(CWindow* pWindow) { const auto TILED = isWindowTiled(pWindow); // event - g_pEventManager->postEvent(SHyprIPCEvent{"changefloatingmode", getFormat("%lx,%d", pWindow, (int)TILED)}); + g_pEventManager->postEvent(SHyprIPCEvent{"changefloatingmode", getFormat("{:x},{}", (uintptr_t)pWindow, (int)TILED)}); EMIT_HOOK_EVENT("changeFloatingMode", pWindow); if (!TILED) { diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index f82ac206..055f4e3f 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -484,7 +484,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) { } if (!PMONITOR) { - Debug::log(ERR, "Orphaned Node %lx (workspace ID: %i)!!", pNode, pNode->workspaceID); + Debug::log(ERR, "Orphaned Node {:x} (workspace ID: {})!!", (uintptr_t)pNode, pNode->workspaceID); return; } @@ -509,7 +509,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) { auto gapsOut = WORKSPACERULE.gapsOut.value_or(*PGAPSOUT); if (!g_pCompositor->windowValidMapped(PWINDOW)) { - Debug::log(ERR, "Node %lx holding invalid window %lx!!", pNode, PWINDOW); + Debug::log(ERR, "Node {:x} holding invalid window {:x}!!", (uintptr_t)pNode, (uintptr_t)PWINDOW); return; } -- cgit v1.2.3