aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIkalco <[email protected]>2024-12-17 10:31:27 -0600
committerGitHub <[email protected]>2024-12-17 17:31:27 +0100
commite2c78c00e50a0835c3830c8a0cd82049dc5700b8 (patch)
tree7ac17c752f1569e60a63e5356e199de6968cbb0e
parentbd7092a9feb39275a9eb1426046a46671e0fe580 (diff)
downloadHyprland-e2c78c00e50a0835c3830c8a0cd82049dc5700b8.tar.gz
Hyprland-e2c78c00e50a0835c3830c8a0cd82049dc5700b8.zip
internal: remove dead code (#8748)
-rw-r--r--src/Compositor.cpp16
-rw-r--r--src/Compositor.hpp2
-rw-r--r--src/config/ConfigManager.cpp20
-rw-r--r--src/config/ConfigManager.hpp3
-rw-r--r--src/desktop/Window.cpp9
-rw-r--r--src/desktop/Window.hpp1
-rw-r--r--src/events/Windows.cpp9
-rw-r--r--src/helpers/AnimatedVariable.cpp5
-rw-r--r--src/helpers/AnimatedVariable.hpp2
-rw-r--r--src/helpers/MiscFunctions.cpp20
-rw-r--r--src/helpers/MiscFunctions.hpp2
-rw-r--r--src/layout/DwindleLayout.cpp17
-rw-r--r--src/layout/DwindleLayout.hpp1
-rw-r--r--src/managers/input/InputMethodRelay.cpp4
-rw-r--r--src/managers/input/InputMethodRelay.hpp1
-rw-r--r--src/protocols/core/Shm.hpp1
-rw-r--r--src/protocols/types/DMABuffer.cpp6
-rw-r--r--src/protocols/types/DMABuffer.hpp3
-rw-r--r--src/render/OpenGL.cpp7
19 files changed, 2 insertions, 127 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index ecf251f3..dea8cddf 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<std::string>("cursor:default_monitor");
static bool cursorDefaultDone = false;
diff --git a/src/Compositor.hpp b/src/Compositor.hpp
index 96c2c5fe..e1862829 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<CWLSurfaceResource> pSurface, double scale);
void setPreferredTransformForSurface(SP<CWLSurfaceResource> pSurface, wl_output_transform transform);
void updateSuspendedStates();
- PHLWINDOW windowForCPointer(CWindow*);
void onNewMonitor(SP<Aquamarine::IOutput> output);
std::string explicitConfigPath;
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index f77a6b42..f4ba7379 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<std::string, SAnimationPropertyConfig> 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 7ce7d495..b1e7e7fd 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 cfced8a3..c0752224 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 c72f010e..7b2cfbdf 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 85eae934..edc29ed3 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 6deeff39..ab5643a6 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::milliseconds>(std::chrono::steady_clock::now() - animationBegin).count(), 0);
-}
-
float CBaseAnimatedVariable::getPercent() {
const auto DURATIONPASSED = std::chrono::duration_cast<std::chrono::milliseconds>(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 a2a06675..a1da00da 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 9b92c63d..6d365161 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 018efbed..b179b3d6 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 ec874223..dc6e37dd 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<SDwindleNodeData*>* 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<SDwindleNodeData*>* pVec, std::vector<SDwindleNodeData*>* 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 dffc34f7..be47e724 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<SDwindleNodeData*>*);
CHyprDwindleLayout* layout = nullptr;
};
diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp
index 5ef7f331..88439924 100644
--- a/src/managers/input/InputMethodRelay.cpp
+++ b/src/managers/input/InputMethodRelay.cpp
@@ -68,10 +68,6 @@ void CInputMethodRelay::onNewIME(SP<CInputMethodV2> pIME) {
}
}
-void CInputMethodRelay::setIMEPopupFocus(CInputPopup* pPopup, SP<CWLSurfaceResource> 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 3d706563..998e1fc6 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<CWLSurfaceResource>);
void removePopup(CInputPopup*);
CInputPopup* popupFromCoords(const Vector2D& point);
diff --git a/src/protocols/core/Shm.hpp b/src/protocols/core/Shm.hpp
index fab325fe..9f4e18f9 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 2b4c1bac..ae684424 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 6977df4c..40c935c5 100644
--- a/src/protocols/types/DMABuffer.hpp
+++ b/src/protocols/types/DMABuffer.hpp
@@ -15,7 +15,6 @@ class CDMABuffer : public IHLBuffer {
virtual std::tuple<uint8_t*, uint32_t, size_t> 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 307fa975..9511123c 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -2142,13 +2142,6 @@ void CHyprOpenGLImpl::renderTextureWithBlur(SP<CTexture> 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()!");