aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIkalco <[email protected]>2024-07-22 11:06:11 -0500
committerGitHub <[email protected]>2024-07-22 18:06:11 +0200
commite8374e07927826f43d30803b6db00c3b88482e7e (patch)
treeaf37a718d9a7ce6453600eebbfd536ee034f2af1
parent77b134e23baf769aecdf2ea8ed14d55d00228ce1 (diff)
downloadHyprland-e8374e07927826f43d30803b6db00c3b88482e7e.tar.gz
Hyprland-e8374e07927826f43d30803b6db00c3b88482e7e.zip
debug: get rid of useless 1s in logs (#6969)
* get rid of 1s in logs lol * replace WLR with AQ in logs
-rw-r--r--src/Compositor.cpp10
-rw-r--r--src/desktop/LayerSurface.cpp6
-rw-r--r--src/helpers/Monitor.cpp2
-rw-r--r--src/managers/input/IdleInhibitor.cpp2
-rw-r--r--src/managers/input/InputManager.cpp8
-rw-r--r--src/protocols/AlphaModifier.cpp4
-rw-r--r--src/protocols/FractionalScale.cpp4
-rw-r--r--src/protocols/ToplevelExport.cpp2
-rw-r--r--src/xwayland/XWM.cpp2
9 files changed, 20 insertions, 20 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index e3ef664d..24098bee 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1100,7 +1100,7 @@ void CCompositor::focusSurface(SP<CWLSurfaceResource> pSurface, PHLWINDOW pWindo
return;
if (g_pSeatManager->seatGrab && !g_pSeatManager->seatGrab->accepts(pSurface)) {
- Debug::log(LOG, "surface {:x} won't receive kb focus becuase grab rejected it", (uintptr_t)pSurface);
+ Debug::log(LOG, "surface {:x} won't receive kb focus becuase grab rejected it", (uintptr_t)pSurface.get());
return;
}
@@ -1123,9 +1123,9 @@ void CCompositor::focusSurface(SP<CWLSurfaceResource> pSurface, PHLWINDOW pWindo
g_pSeatManager->setKeyboardFocus(pSurface);
if (pWindowOwner)
- Debug::log(LOG, "Set keyboard focus to surface {:x}, with {}", (uintptr_t)pSurface, pWindowOwner);
+ Debug::log(LOG, "Set keyboard focus to surface {:x}, with {}", (uintptr_t)pSurface.get(), pWindowOwner);
else
- Debug::log(LOG, "Set keyboard focus to surface {:x}", (uintptr_t)pSurface);
+ Debug::log(LOG, "Set keyboard focus to surface {:x}", (uintptr_t)pSurface.get());
g_pXWaylandManager->activateSurface(pSurface, true);
m_pLastFocus = pSurface;
@@ -2836,7 +2836,7 @@ void CCompositor::setPreferredScaleForSurface(SP<CWLSurfaceResource> pSurface, d
const auto PSURFACE = CWLSurface::fromResource(pSurface);
if (!PSURFACE) {
- Debug::log(WARN, "Orphaned CWLSurfaceResource {:x} in setPreferredScaleForSurface", (uintptr_t)pSurface);
+ Debug::log(WARN, "Orphaned CWLSurfaceResource {:x} in setPreferredScaleForSurface", (uintptr_t)pSurface.get());
return;
}
@@ -2849,7 +2849,7 @@ void CCompositor::setPreferredTransformForSurface(SP<CWLSurfaceResource> pSurfac
const auto PSURFACE = CWLSurface::fromResource(pSurface);
if (!PSURFACE) {
- Debug::log(WARN, "Orphaned CWLSurfaceResource {:x} in setPreferredTransformForSurface", (uintptr_t)pSurface);
+ Debug::log(WARN, "Orphaned CWLSurfaceResource {:x} in setPreferredTransformForSurface", (uintptr_t)pSurface.get());
return;
}
diff --git a/src/desktop/LayerSurface.cpp b/src/desktop/LayerSurface.cpp
index 9a891531..83b0992f 100644
--- a/src/desktop/LayerSurface.cpp
+++ b/src/desktop/LayerSurface.cpp
@@ -74,7 +74,7 @@ CLayerSurface::~CLayerSurface() {
}
void CLayerSurface::onDestroy() {
- Debug::log(LOG, "LayerSurface {:x} destroyed", (uintptr_t)layerSurface);
+ Debug::log(LOG, "LayerSurface {:x} destroyed", (uintptr_t)layerSurface.get());
const auto PMONITOR = g_pCompositor->getMonitorFromID(monitorID);
@@ -114,7 +114,7 @@ void CLayerSurface::onDestroy() {
}
void CLayerSurface::onMap() {
- Debug::log(LOG, "LayerSurface {:x} mapped", (uintptr_t)layerSurface);
+ Debug::log(LOG, "LayerSurface {:x} mapped", (uintptr_t)layerSurface.get());
mapped = true;
interactivity = layerSurface->current.interactivity;
@@ -177,7 +177,7 @@ void CLayerSurface::onMap() {
}
void CLayerSurface::onUnmap() {
- Debug::log(LOG, "LayerSurface {:x} unmapped", (uintptr_t)layerSurface);
+ Debug::log(LOG, "LayerSurface {:x} unmapped", (uintptr_t)layerSurface.get());
g_pEventManager->postEvent(SHyprIPCEvent{"closelayer", layerSurface->layerNamespace});
EMIT_HOOK_EVENT("closeLayer", self.lock());
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index a23b9861..635427d1 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -148,7 +148,7 @@ void CMonitor::onConnect(bool noRule) {
damage.setSize(vecTransformedSize);
- Debug::log(LOG, "Added new monitor with name {} at {:j0} with size {:j0}, pointer {:x}", output->name, vecPosition, vecPixelSize, (uintptr_t)output);
+ Debug::log(LOG, "Added new monitor with name {} at {:j0} with size {:j0}, pointer {:x}", output->name, vecPosition, vecPixelSize, (uintptr_t)output.get());
setupDefaultWS(monitorRule);
diff --git a/src/managers/input/IdleInhibitor.cpp b/src/managers/input/IdleInhibitor.cpp
index a38acdbf..da2429bc 100644
--- a/src/managers/input/IdleInhibitor.cpp
+++ b/src/managers/input/IdleInhibitor.cpp
@@ -7,7 +7,7 @@ void CInputManager::newIdleInhibitor(std::any inhibitor) {
const auto PINHIBIT = m_vIdleInhibitors.emplace_back(std::make_unique<SIdleInhibitor>()).get();
PINHIBIT->inhibitor = std::any_cast<SP<CIdleInhibitor>>(inhibitor);
- Debug::log(LOG, "New idle inhibitor registered for surface {:x}", (uintptr_t)PINHIBIT->inhibitor->surface);
+ Debug::log(LOG, "New idle inhibitor registered for surface {:x}", (uintptr_t)PINHIBIT->inhibitor->surface.get());
PINHIBIT->inhibitor->listeners.destroy = PINHIBIT->inhibitor->resource->events.destroy.registerListener([this, PINHIBIT](std::any data) {
std::erase_if(m_vIdleInhibitors, [PINHIBIT](const auto& other) { return other.get() == PINHIBIT; });
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 492d2805..e2c62367 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -228,7 +228,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
return;
} else
- Debug::log(ERR, "BUG THIS: Null SURF/CONSTRAINT in mouse refocus. Ignoring constraints. {:x} {:x}", (uintptr_t)SURF, (uintptr_t)CONSTRAINT.get());
+ Debug::log(ERR, "BUG THIS: Null SURF/CONSTRAINT in mouse refocus. Ignoring constraints. {:x} {:x}", (uintptr_t)SURF.get(), (uintptr_t)CONSTRAINT.get());
}
// if we are holding a pointer button,
@@ -570,7 +570,7 @@ void CInputManager::processMouseRequest(std::any E) {
auto e = std::any_cast<CSeatManager::SSetCursorEvent>(E);
- Debug::log(LOG, "cursorImage request: surface {:x}", (uintptr_t)e.surf);
+ Debug::log(LOG, "cursorImage request: surface {:x}", (uintptr_t)e.surf.get());
if (e.surf != m_sCursorSurfaceInfo.wlSurface->resource()) {
m_sCursorSurfaceInfo.wlSurface->unassign();
@@ -850,7 +850,7 @@ void CInputManager::newKeyboard(SP<Aquamarine::IKeyboard> keyboard) {
setupKeyboard(PNEWKEYBOARD);
- Debug::log(LOG, "New keyboard created, pointers Hypr: {:x} and WLR: {:x}", (uintptr_t)PNEWKEYBOARD.get(), (uintptr_t)keyboard);
+ Debug::log(LOG, "New keyboard created, pointers Hypr: {:x} and AQ: {:x}", (uintptr_t)PNEWKEYBOARD.get(), (uintptr_t)keyboard.get());
}
void CInputManager::newVirtualKeyboard(SP<CVirtualKeyboardV1Resource> keyboard) {
@@ -992,7 +992,7 @@ void CInputManager::newMouse(SP<Aquamarine::IPointer> mouse) {
setupMouse(PMOUSE);
- Debug::log(LOG, "New mouse created, pointer WLR: {:x}", (uintptr_t)mouse);
+ Debug::log(LOG, "New mouse created, pointer AQ: {:x}", (uintptr_t)mouse.get());
}
void CInputManager::setupMouse(SP<IPointer> mauz) {
diff --git a/src/protocols/AlphaModifier.cpp b/src/protocols/AlphaModifier.cpp
index 04dcd0a8..38b8c800 100644
--- a/src/protocols/AlphaModifier.cpp
+++ b/src/protocols/AlphaModifier.cpp
@@ -87,7 +87,7 @@ void CAlphaModifierProtocol::destroyModifier(CAlphaModifier* modifier) {
void CAlphaModifierProtocol::onGetSurface(CWpAlphaModifierV1* pMgr, uint32_t id, SP<CWLSurfaceResource> surface) {
if (std::find_if(m_mAlphaModifiers.begin(), m_mAlphaModifiers.end(), [surface](const auto& e) { return e.first == surface; }) != m_mAlphaModifiers.end()) {
- LOGM(ERR, "AlphaModifier already present for surface {:x}", (uintptr_t)surface);
+ LOGM(ERR, "AlphaModifier already present for surface {:x}", (uintptr_t)surface.get());
pMgr->error(WP_ALPHA_MODIFIER_V1_ERROR_ALREADY_CONSTRUCTED, "AlphaModifier already present");
return;
}
@@ -100,4 +100,4 @@ void CAlphaModifierProtocol::onGetSurface(CWpAlphaModifierV1* pMgr, uint32_t id,
m_mAlphaModifiers.erase(surface);
return;
}
-} \ No newline at end of file
+}
diff --git a/src/protocols/FractionalScale.cpp b/src/protocols/FractionalScale.cpp
index 6d225e99..5bf56c5a 100644
--- a/src/protocols/FractionalScale.cpp
+++ b/src/protocols/FractionalScale.cpp
@@ -28,7 +28,7 @@ void CFractionalScaleProtocol::onManagerResourceDestroy(wl_resource* res) {
void CFractionalScaleProtocol::onGetFractionalScale(CWpFractionalScaleManagerV1* pMgr, uint32_t id, SP<CWLSurfaceResource> surface) {
for (auto& [k, v] : m_mAddons) {
if (k == surface) {
- LOGM(ERR, "Surface {:x} already has a fractionalScale addon", (uintptr_t)surface);
+ LOGM(ERR, "Surface {:x} already has a fractionalScale addon", (uintptr_t)surface.get());
pMgr->error(WP_FRACTIONAL_SCALE_MANAGER_V1_ERROR_FRACTIONAL_SCALE_EXISTS, "Fractional scale already exists");
return;
}
@@ -80,4 +80,4 @@ bool CFractionalScaleAddon::good() {
SP<CWLSurfaceResource> CFractionalScaleAddon::surf() {
return surface.lock();
-} \ No newline at end of file
+}
diff --git a/src/protocols/ToplevelExport.cpp b/src/protocols/ToplevelExport.cpp
index 0e78e5f7..e982ad6f 100644
--- a/src/protocols/ToplevelExport.cpp
+++ b/src/protocols/ToplevelExport.cpp
@@ -221,7 +221,7 @@ void CToplevelExportProtocolManager::copyFrame(wl_client* client, wl_resource* r
const auto PWINDOW = PFRAME->pWindow.lock();
if (!validMapped(PWINDOW)) {
- Debug::log(ERR, "Client requested sharing of window handle {:x} which is gone!", (uintptr_t)PWINDOW.get());
+ Debug::log(ERR, "Client requested sharing of window handle {:x} which is gone!", PWINDOW);
hyprland_toplevel_export_frame_v1_send_failed(PFRAME->resource);
removeFrame(PFRAME);
return;
diff --git a/src/xwayland/XWM.cpp b/src/xwayland/XWM.cpp
index bb69afda..498710a4 100644
--- a/src/xwayland/XWM.cpp
+++ b/src/xwayland/XWM.cpp
@@ -937,7 +937,7 @@ void CXWM::onNewSurface(SP<CWLSurfaceResource> surf) {
if (surf->client() != g_pXWayland->pServer->xwaylandClient)
return;
- Debug::log(LOG, "[xwm] New XWayland surface at {:x}", (uintptr_t)surf);
+ Debug::log(LOG, "[xwm] New XWayland surface at {:x}", (uintptr_t)surf.get());
const auto WLID = surf->id();