diff options
Diffstat (limited to 'src/helpers/Monitor.cpp')
-rw-r--r-- | src/helpers/Monitor.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 844b34bb..1cfda2b4 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -79,12 +79,12 @@ void CMonitor::onConnect(bool noRule) { if (PREFSTATE) wlr_output_set_mode(output, PREFSTATE); else - Debug::log(WARN, "No mode found for disabled output %s", output->name); + Debug::log(WARN, "No mode found for disabled output {}", output->name); wlr_output_enable(output, 0); if (!wlr_output_commit(output)) - Debug::log(ERR, "Couldn't commit disabled state on output %s", output->name); + Debug::log(ERR, "Couldn't commit disabled state on output {}", output->name); Events::listener_change(nullptr, nullptr); @@ -136,8 +136,8 @@ void CMonitor::onConnect(bool noRule) { wlr_xcursor_manager_load(g_pCompositor->m_sWLRXCursorMgr, scale); - Debug::log(LOG, "Added new monitor with name %s at %i,%i with size %ix%i, pointer %lx", output->name, (int)vecPosition.x, (int)vecPosition.y, (int)vecPixelSize.x, - (int)vecPixelSize.y, output); + Debug::log(LOG, "Added new monitor with name {} at {},{} with size {}x{}, pointer {:x}", output->name, (int)vecPosition.x, (int)vecPosition.y, (int)vecPixelSize.x, + (int)vecPixelSize.y, (uintptr_t)output); setupDefaultWS(monitorRule); @@ -197,7 +197,7 @@ void CMonitor::onDisconnect() { if (!m_bEnabled || g_pCompositor->m_bIsShuttingDown) return; - Debug::log(LOG, "onDisconnect called for %s", output->name); + Debug::log(LOG, "onDisconnect called for {}", output->name); // Cleanup everything. Move windows back, snap cursor, shit. CMonitor* BACKUPMON = nullptr; @@ -239,7 +239,7 @@ void CMonitor::onDisconnect() { m_aLayerSurfaceLayers[i].clear(); } - Debug::log(LOG, "Removed monitor %s!", szName.c_str()); + Debug::log(LOG, "Removed monitor {}!", szName.c_str()); g_pEventManager->postEvent(SHyprIPCEvent{"monitorremoved", szName}); EMIT_HOOK_EVENT("monitorRemoved", this); @@ -356,12 +356,12 @@ void CMonitor::setupDefaultWS(const SMonitorRule& monitorRule) { WORKSPACEID = g_pCompositor->m_vWorkspaces.size() + 1; newDefaultWorkspaceName = std::to_string(WORKSPACEID); - Debug::log(LOG, "Invalid workspace= directive name in monitor parsing, workspace name \"%s\" is invalid.", g_pConfigManager->getDefaultWorkspaceFor(szName).c_str()); + Debug::log(LOG, "Invalid workspace= directive name in monitor parsing, workspace name \"{}\" is invalid.", g_pConfigManager->getDefaultWorkspaceFor(szName).c_str()); } auto PNEWWORKSPACE = g_pCompositor->getWorkspaceByID(WORKSPACEID); - Debug::log(LOG, "New monitor: WORKSPACEID %d, exists: %d", WORKSPACEID, (int)(PNEWWORKSPACE != nullptr)); + Debug::log(LOG, "New monitor: WORKSPACEID {}, exists: {}", WORKSPACEID, (int)(PNEWWORKSPACE != nullptr)); if (PNEWWORKSPACE) { // workspace exists, move it to the newly connected monitor @@ -500,7 +500,7 @@ void CMonitor::changeWorkspace(CWorkspace* const pWorkspace, bool internal) { if (pWorkspace->m_bIsSpecialWorkspace) { if (specialWorkspaceID != pWorkspace->m_iID) { - Debug::log(LOG, "changeworkspace on special, togglespecialworkspace to id %i", pWorkspace->m_iID); + Debug::log(LOG, "changeworkspace on special, togglespecialworkspace to id {}", pWorkspace->m_iID); g_pKeybindManager->m_mDispatchers["togglespecialworkspace"](pWorkspace->m_szName == "special" ? "" : pWorkspace->m_szName); } return; |