diff --git a/src/Compositor.cpp b/src/Compositor.cpp index ecf251f3b..dea8cddff 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2234,11 +2234,6 @@ void CCompositor::updateFullscreenFadeOnWorkspace(PHLWORKSPACE pWorkspace) { } } -void CCompositor::changeWindowFullscreenModeInternal(const PHLWINDOW PWINDOW, const eFullscreenMode MODE, const bool ON) { - setWindowFullscreenInternal( - PWINDOW, (eFullscreenMode)(ON ? (uint8_t)PWINDOW->m_sFullscreenState.internal | (uint8_t)MODE : ((uint8_t)PWINDOW->m_sFullscreenState.internal & (uint8_t)~MODE))); -} - void CCompositor::changeWindowFullscreenModeClient(const PHLWINDOW PWINDOW, const eFullscreenMode MODE, const bool ON) { setWindowFullscreenClient(PWINDOW, (eFullscreenMode)(ON ? (uint8_t)PWINDOW->m_sFullscreenState.client | (uint8_t)MODE : ((uint8_t)PWINDOW->m_sFullscreenState.client & (uint8_t)~MODE))); @@ -2904,17 +2899,6 @@ void CCompositor::updateSuspendedStates() { } } -PHLWINDOW CCompositor::windowForCPointer(CWindow* pWindow) { - for (auto const& w : m_vWindows) { - if (w.get() != pWindow) - continue; - - return w; - } - - return {}; -} - static void checkDefaultCursorWarp(PHLMONITOR monitor) { static auto PCURSORMONITOR = CConfigValue("cursor:default_monitor"); static bool cursorDefaultDone = false; diff --git a/src/Compositor.hpp b/src/Compositor.hpp index 96c2c5fe0..e18628292 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -140,7 +140,6 @@ class CCompositor { void setWindowFullscreenInternal(const PHLWINDOW PWINDOW, const eFullscreenMode MODE); void setWindowFullscreenClient(const PHLWINDOW PWINDOW, const eFullscreenMode MODE); void setWindowFullscreenState(const PHLWINDOW PWINDOW, const SFullscreenState state); - void changeWindowFullscreenModeInternal(const PHLWINDOW PWINDOW, const eFullscreenMode MODE, const bool ON); void changeWindowFullscreenModeClient(const PHLWINDOW PWINDOW, const eFullscreenMode MODE, const bool ON); void updateFullscreenFadeOnWorkspace(PHLWORKSPACE); PHLWINDOW getX11Parent(PHLWINDOW); @@ -167,7 +166,6 @@ class CCompositor { void setPreferredScaleForSurface(SP pSurface, double scale); void setPreferredTransformForSurface(SP pSurface, wl_output_transform transform); void updateSuspendedStates(); - PHLWINDOW windowForCPointer(CWindow*); void onNewMonitor(SP output); std::string explicitConfigPath; diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index f77a6b42a..f4ba73793 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1483,22 +1483,6 @@ void CConfigManager::dispatchExecShutdown() { handleExecShutdown("", "hyprctl dispatch exit"); } -void CConfigManager::appendMonitorRule(const SMonitorRule& r) { - m_vMonitorRules.emplace_back(r); -} - -bool CConfigManager::replaceMonitorRule(const SMonitorRule& newrule) { - // Looks for an existing monitor rule (compared by name). - // If the rule exists, it is replaced with the input rule. - for (auto& r : m_vMonitorRules) { - if (r.name == newrule.name) { - r = newrule; - return true; - } - } - return false; -} - void CConfigManager::performMonitorReload() { bool overAgain = false; @@ -1718,10 +1702,6 @@ std::unordered_map CConfigManager::getAni return animationConfig; } -void onPluginLoadUnload(const std::string& name, bool load) { - // -} - void CConfigManager::addPluginConfigVar(HANDLE handle, const std::string& name, const Hyprlang::CConfigValue& value) { if (!name.starts_with("plugin:")) return; diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index 7ce7d495e..b1e7e7fdc 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -163,7 +163,6 @@ class CConfigManager { void* const* getConfigValuePtr(const std::string&); Hyprlang::CConfigValue* getHyprlangConfigValuePtr(const std::string& name, const std::string& specialCat = ""); - void onPluginLoadUnload(const std::string& name, bool load); static std::string getMainConfigPath(); std::string getConfigString(); @@ -193,8 +192,6 @@ class CConfigManager { void dispatchExecShutdown(); void performMonitorReload(); - void appendMonitorRule(const SMonitorRule&); - bool replaceMonitorRule(const SMonitorRule&); void ensureMonitorStatus(); void ensureVRR(PHLMONITOR pMonitor = nullptr); diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index cfced8a30..c0752224a 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -473,15 +473,6 @@ PHLWINDOW CWindow::x11TransientFor() { return nullptr; } -void CWindow::removeDecorationByType(eDecorationType type) { - for (auto const& wd : m_dWindowDecorations) { - if (wd->getDecorationType() == type) - m_vDecosToRemove.push_back(wd.get()); - } - - updateWindowDecos(); -} - void unregisterVar(void* ptr) { ((CBaseAnimatedVariable*)ptr)->unregister(); } diff --git a/src/desktop/Window.hpp b/src/desktop/Window.hpp index c72f010ef..7b2cfbdfd 100644 --- a/src/desktop/Window.hpp +++ b/src/desktop/Window.hpp @@ -399,7 +399,6 @@ class CWindow { bool checkInputOnDecos(const eInputType, const Vector2D&, std::any = {}); pid_t getPID(); IHyprWindowDecoration* getDecorationByType(eDecorationType); - void removeDecorationByType(eDecorationType); void updateToplevel(); void updateSurfaceScaleTransformDetails(bool force = false); void moveToWorkspace(PHLWORKSPACE); diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 85eae934a..edc29ed36 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -872,15 +872,6 @@ void Events::listener_destroyWindow(void* owner, void* data) { PWINDOW->listeners.commit.reset(); } -void Events::listener_setTitleWindow(void* owner, void* data) { - PHLWINDOW PWINDOW = ((CWindow*)owner)->m_pSelf.lock(); - - if (!validMapped(PWINDOW)) - return; - - PWINDOW->onUpdateMeta(); -} - void Events::listener_activateX11(void* owner, void* data) { PHLWINDOW PWINDOW = ((CWindow*)owner)->m_pSelf.lock(); diff --git a/src/helpers/AnimatedVariable.cpp b/src/helpers/AnimatedVariable.cpp index 6deeff392..ab5643a6e 100644 --- a/src/helpers/AnimatedVariable.cpp +++ b/src/helpers/AnimatedVariable.cpp @@ -55,11 +55,6 @@ void CBaseAnimatedVariable::registerVar() { m_bIsRegistered = true; } -int CBaseAnimatedVariable::getDurationLeftMs() { - return std::max( - (int)(m_pConfig->pValues->internalSpeed * 100) - (int)std::chrono::duration_cast(std::chrono::steady_clock::now() - animationBegin).count(), 0); -} - float CBaseAnimatedVariable::getPercent() { const auto DURATIONPASSED = std::chrono::duration_cast(std::chrono::steady_clock::now() - animationBegin).count(); return std::clamp((DURATIONPASSED / 100.f) / m_pConfig->pValues->internalSpeed, 0.f, 1.f); diff --git a/src/helpers/AnimatedVariable.hpp b/src/helpers/AnimatedVariable.hpp index a2a06675a..a1da00da5 100644 --- a/src/helpers/AnimatedVariable.hpp +++ b/src/helpers/AnimatedVariable.hpp @@ -95,8 +95,6 @@ class CBaseAnimatedVariable { return m_pConfig; } - int getDurationLeftMs(); - /* returns the spent (completion) % */ float getPercent(); diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 9b92c63d0..6d3651618 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -161,26 +161,6 @@ std::string absolutePath(const std::string& rawpath, const std::string& currentP return value; } -void addWLSignal(wl_signal* pSignal, wl_listener* pListener, void* pOwner, const std::string& ownerString) { - ASSERT(pSignal); - ASSERT(pListener); - - wl_signal_add(pSignal, pListener); - - Debug::log(LOG, "Registered signal for owner {:x}: {:x} -> {:x} (owner: {})", (uintptr_t)pOwner, (uintptr_t)pSignal, (uintptr_t)pListener, ownerString); -} - -void removeWLSignal(wl_listener* pListener) { - wl_list_remove(&pListener->link); - wl_list_init(&pListener->link); - - Debug::log(LOG, "Removed listener {:x}", (uintptr_t)pListener); -} - -void handleNoop(struct wl_listener* listener, void* data) { - // Do nothing -} - std::string escapeJSONStrings(const std::string& str) { std::ostringstream oss; for (auto const& c : str) { diff --git a/src/helpers/MiscFunctions.hpp b/src/helpers/MiscFunctions.hpp index 018efbedb..b179b3d6c 100644 --- a/src/helpers/MiscFunctions.hpp +++ b/src/helpers/MiscFunctions.hpp @@ -21,8 +21,6 @@ struct SWorkspaceIDName { }; std::string absolutePath(const std::string&, const std::string&); -void addWLSignal(wl_signal*, wl_listener*, void* pOwner, const std::string& ownerString); -void removeWLSignal(wl_listener*); std::string escapeJSONStrings(const std::string& str); bool isDirection(const std::string&); bool isDirection(const char&); diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index ec874223e..dc6e37dd2 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -38,14 +38,6 @@ void SDwindleNodeData::recalcSizePosRecursive(bool force, bool horizontalOverrid } } -void SDwindleNodeData::getAllChildrenRecursive(std::vector* pVec) { - if (children[0]) { - children[0]->getAllChildrenRecursive(pVec); - children[1]->getAllChildrenRecursive(pVec); - } else - pVec->push_back(this); -} - int CHyprDwindleLayout::getNodesOnWorkspace(const WORKSPACEID& id) { int no = 0; for (auto const& n : m_lDwindleNodesData) { @@ -804,15 +796,6 @@ void CHyprDwindleLayout::recalculateWindow(PHLWINDOW pWindow) { PNODE->recalcSizePosRecursive(); } -static void addToVectorRecursive(std::vector* pVec, std::vector* pParents, SDwindleNodeData* node) { - if (node->isNode) { - pParents->emplace_back(node); - addToVectorRecursive(pVec, pParents, node->children[0]); - addToVectorRecursive(pVec, pParents, node->children[1]); - } else - pVec->emplace_back(node); -} - SWindowRenderLayoutHints CHyprDwindleLayout::requestRenderHints(PHLWINDOW pWindow) { // window should be valid, insallah SWindowRenderLayoutHints hints; diff --git a/src/layout/DwindleLayout.hpp b/src/layout/DwindleLayout.hpp index dffc34f72..be47e724d 100644 --- a/src/layout/DwindleLayout.hpp +++ b/src/layout/DwindleLayout.hpp @@ -39,7 +39,6 @@ struct SDwindleNodeData { } void recalcSizePosRecursive(bool force = false, bool horizontalOverride = false, bool verticalOverride = false); - void getAllChildrenRecursive(std::vector*); CHyprDwindleLayout* layout = nullptr; }; diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index 5ef7f3314..884399243 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -68,10 +68,6 @@ void CInputMethodRelay::onNewIME(SP pIME) { } } -void CInputMethodRelay::setIMEPopupFocus(CInputPopup* pPopup, SP pSurface) { - pPopup->onCommit(); -} - void CInputMethodRelay::removePopup(CInputPopup* pPopup) { std::erase_if(m_vIMEPopups, [pPopup](const auto& other) { return other.get() == pPopup; }); } diff --git a/src/managers/input/InputMethodRelay.hpp b/src/managers/input/InputMethodRelay.hpp index 3d706563a..998e1fc62 100644 --- a/src/managers/input/InputMethodRelay.hpp +++ b/src/managers/input/InputMethodRelay.hpp @@ -30,7 +30,6 @@ class CInputMethodRelay { CTextInput* getFocusedTextInput(); - void setIMEPopupFocus(CInputPopup*, SP); void removePopup(CInputPopup*); CInputPopup* popupFromCoords(const Vector2D& point); diff --git a/src/protocols/core/Shm.hpp b/src/protocols/core/Shm.hpp index fab325fe9..9f4e18f95 100644 --- a/src/protocols/core/Shm.hpp +++ b/src/protocols/core/Shm.hpp @@ -43,7 +43,6 @@ class CWLSHMBuffer : public IHLBuffer { virtual void endDataPtr(); bool good(); - void updateTexture(); int32_t offset = 0, stride = 0; uint32_t fmt = 0; diff --git a/src/protocols/types/DMABuffer.cpp b/src/protocols/types/DMABuffer.cpp index 2b4c1bac3..ae6844244 100644 --- a/src/protocols/types/DMABuffer.cpp +++ b/src/protocols/types/DMABuffer.cpp @@ -71,10 +71,6 @@ bool CDMABuffer::good() { return success; } -void CDMABuffer::updateTexture() { - ; -} - void CDMABuffer::closeFDs() { for (int i = 0; i < attrs.planes; ++i) { if (attrs.fds[i] == -1) @@ -83,4 +79,4 @@ void CDMABuffer::closeFDs() { attrs.fds[i] = -1; } attrs.planes = 0; -} \ No newline at end of file +} diff --git a/src/protocols/types/DMABuffer.hpp b/src/protocols/types/DMABuffer.hpp index 6977df4c1..40c935c56 100644 --- a/src/protocols/types/DMABuffer.hpp +++ b/src/protocols/types/DMABuffer.hpp @@ -15,7 +15,6 @@ class CDMABuffer : public IHLBuffer { virtual std::tuple beginDataPtr(uint32_t flags); virtual void endDataPtr(); bool good(); - void updateTexture(); void closeFDs(); bool success = false; @@ -26,4 +25,4 @@ class CDMABuffer : public IHLBuffer { struct { CHyprSignalListener resourceDestroy; } listeners; -}; \ No newline at end of file +}; diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 307fa9755..9511123c0 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -2142,13 +2142,6 @@ void CHyprOpenGLImpl::renderTextureWithBlur(SP tex, CBox* pBox, float scissor((CBox*)nullptr); } -void pushVert2D(float x, float y, float* arr, int& counter, CBox* box) { - // 0-1 space god damnit - arr[counter * 2 + 0] = x / box->width; - arr[counter * 2 + 1] = y / box->height; - counter++; -} - void CHyprOpenGLImpl::renderBorder(CBox* box, const CGradientValueData& grad, int round, int borderSize, float a, int outerRound) { RASSERT((box->width > 0 && box->height > 0), "Tried to render rect with width/height < 0!"); RASSERT(m_RenderData.pMonitor, "Tried to render rect without begin()!");