Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of 1 in logs #6969

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,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;
}

Expand All @@ -1152,9 +1152,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;
Expand Down Expand Up @@ -2865,7 +2865,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;
}

Expand All @@ -2878,7 +2878,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;
}

Expand Down
6 changes: 3 additions & 3 deletions src/desktop/LayerSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/managers/input/IdleInhibitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; });
Expand Down
8 changes: 4 additions & 4 deletions src/managers/input/InputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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 WLR: {:x}", (uintptr_t)PNEWKEYBOARD.get(), (uintptr_t)keyboard.get());
}

void CInputManager::newVirtualKeyboard(SP<CVirtualKeyboardV1Resource> keyboard) {
Expand Down Expand Up @@ -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 WLR: {:x}", (uintptr_t)mouse.get());
ikalco marked this conversation as resolved.
Show resolved Hide resolved
}

void CInputManager::setupMouse(SP<IPointer> mauz) {
Expand Down
4 changes: 2 additions & 2 deletions src/protocols/AlphaModifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -100,4 +100,4 @@ void CAlphaModifierProtocol::onGetSurface(CWpAlphaModifierV1* pMgr, uint32_t id,
m_mAlphaModifiers.erase(surface);
return;
}
}
}
4 changes: 2 additions & 2 deletions src/protocols/FractionalScale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -80,4 +80,4 @@ bool CFractionalScaleAddon::good() {

SP<CWLSurfaceResource> CFractionalScaleAddon::surf() {
return surface.lock();
}
}
2 changes: 1 addition & 1 deletion src/protocols/ToplevelExport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/xwayland/XWM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,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();

Expand Down
Loading