refactor: Use new hyprutils casts (#11377)

This commit is contained in:
Kamikadze 2025-08-14 19:44:56 +05:00 committed by GitHub
parent aa6a78f0a4
commit beee22a95e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
116 changed files with 715 additions and 696 deletions

View file

@ -90,7 +90,7 @@ void CPopup::initAllSignals() {
void CPopup::onNewPopup(SP<CXDGPopupResource> popup) {
const auto& POPUP = m_children.emplace_back(CPopup::create(popup, m_self));
POPUP->m_self = POPUP;
Debug::log(LOG, "New popup at {:x}", (uintptr_t)this);
Debug::log(LOG, "New popup at {:x}", rc<uintptr_t>(this));
}
void CPopup::onDestroy() {
@ -104,7 +104,7 @@ void CPopup::onDestroy() {
m_wlSurface.reset();
if (m_fadingOut && m_alpha->isBeingAnimated()) {
Debug::log(LOG, "popup {:x}: skipping full destroy, animating", (uintptr_t)this);
Debug::log(LOG, "popup {:x}: skipping full destroy, animating", rc<uintptr_t>(this));
return;
}
@ -112,7 +112,7 @@ void CPopup::onDestroy() {
}
void CPopup::fullyDestroy() {
Debug::log(LOG, "popup {:x} fully destroying", (uintptr_t)this);
Debug::log(LOG, "popup {:x} fully destroying", rc<uintptr_t>(this));
g_pHyprRenderer->makeEGLCurrent();
std::erase_if(g_pHyprOpenGL->m_popupFramebuffers, [&](const auto& other) { return other.first.expired() || other.first == m_self; });
@ -151,7 +151,7 @@ void CPopup::onMap() {
m_alpha->setValueAndWarp(0.F);
*m_alpha = 1.F;
Debug::log(LOG, "popup {:x}: mapped", (uintptr_t)this);
Debug::log(LOG, "popup {:x}: mapped", rc<uintptr_t>(this));
}
void CPopup::onUnmap() {
@ -164,7 +164,7 @@ void CPopup::onUnmap() {
return;
}
Debug::log(LOG, "popup {:x}: unmapped", (uintptr_t)this);
Debug::log(LOG, "popup {:x}: unmapped", rc<uintptr_t>(this));
// if the popup committed a different size right now, we also need to damage the old size.
const Vector2D MAX_DAMAGE_SIZE = {std::max(m_lastSize.x, m_resource->m_surface->m_surface->m_current.size.x),
@ -266,7 +266,7 @@ void CPopup::onCommit(bool ignoreSiblings) {
}
void CPopup::onReposition() {
Debug::log(LOG, "Popup {:x} requests reposition", (uintptr_t)this);
Debug::log(LOG, "Popup {:x} requests reposition", rc<uintptr_t>(this));
m_requestedReposition = true;