core: move all shared_ptrs from the STL to hyprutils (#9143)
This commit is contained in:
parent
ae403e6a05
commit
0a1ae48a9f
152 changed files with 297 additions and 349 deletions
|
|
@ -5,7 +5,7 @@
|
|||
#include "../../protocols/core/Compositor.hpp"
|
||||
|
||||
void CInputManager::newIdleInhibitor(std::any inhibitor) {
|
||||
const auto PINHIBIT = m_vIdleInhibitors.emplace_back(std::make_unique<SIdleInhibitor>()).get();
|
||||
const auto PINHIBIT = m_vIdleInhibitors.emplace_back(makeUnique<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.get());
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ class CInputManager {
|
|||
bool nonDesktop = false;
|
||||
CHyprSignalListener surfaceDestroyListener;
|
||||
};
|
||||
std::vector<std::unique_ptr<SIdleInhibitor>> m_vIdleInhibitors;
|
||||
std::vector<UP<SIdleInhibitor>> m_vIdleInhibitors;
|
||||
|
||||
// swipe
|
||||
void beginWorkspaceSwipe();
|
||||
|
|
@ -304,4 +304,4 @@ class CInputManager {
|
|||
friend class CWLSurface;
|
||||
};
|
||||
|
||||
inline std::unique_ptr<CInputManager> g_pInputManager;
|
||||
inline UP<CInputManager> g_pInputManager;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void CInputMethodRelay::onNewIME(SP<CInputMethodV2> pIME) {
|
|||
});
|
||||
|
||||
listeners.newPopup = pIME->events.newPopup.registerListener([this](std::any d) {
|
||||
m_vIMEPopups.emplace_back(std::make_unique<CInputPopup>(std::any_cast<SP<CInputMethodPopupV2>>(d)));
|
||||
m_vIMEPopups.emplace_back(makeUnique<CInputPopup>(std::any_cast<SP<CInputMethodPopupV2>>(d)));
|
||||
|
||||
Debug::log(LOG, "New input popup");
|
||||
});
|
||||
|
|
@ -86,11 +86,11 @@ CTextInput* CInputMethodRelay::getFocusedTextInput() {
|
|||
}
|
||||
|
||||
void CInputMethodRelay::onNewTextInput(WP<CTextInputV3> tiv3) {
|
||||
m_vTextInputs.emplace_back(std::make_unique<CTextInput>(tiv3));
|
||||
m_vTextInputs.emplace_back(makeUnique<CTextInput>(tiv3));
|
||||
}
|
||||
|
||||
void CInputMethodRelay::onNewTextInput(WP<CTextInputV1> pTIV1) {
|
||||
m_vTextInputs.emplace_back(std::make_unique<CTextInput>(pTIV1));
|
||||
m_vTextInputs.emplace_back(makeUnique<CTextInput>(pTIV1));
|
||||
}
|
||||
|
||||
void CInputMethodRelay::removeTextInput(CTextInput* pInput) {
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ class CInputMethodRelay {
|
|||
WP<CInputMethodV2> m_pIME;
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<CTextInput>> m_vTextInputs;
|
||||
std::vector<std::unique_ptr<CInputPopup>> m_vIMEPopups;
|
||||
std::vector<UP<CTextInput>> m_vTextInputs;
|
||||
std::vector<UP<CInputPopup>> m_vIMEPopups;
|
||||
|
||||
WP<CWLSurfaceResource> m_pLastKbFocus;
|
||||
WP<CWLSurfaceResource> m_pLastKbFocus;
|
||||
|
||||
struct {
|
||||
CHyprSignalListener newTIV3;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include "../../helpers/math/Math.hpp"
|
||||
#include "../../helpers/signal/Signal.hpp"
|
||||
#include "../../helpers/memory/Memory.hpp"
|
||||
#include <memory>
|
||||
|
||||
struct wl_client;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue