mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 08:29:50 +01:00
internal: remove dead code (#8748)
This commit is contained in:
parent
bd7092a9fe
commit
e2c78c00e5
19 changed files with 2 additions and 127 deletions
|
@ -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) {
|
void CCompositor::changeWindowFullscreenModeClient(const PHLWINDOW PWINDOW, const eFullscreenMode MODE, const bool ON) {
|
||||||
setWindowFullscreenClient(PWINDOW,
|
setWindowFullscreenClient(PWINDOW,
|
||||||
(eFullscreenMode)(ON ? (uint8_t)PWINDOW->m_sFullscreenState.client | (uint8_t)MODE : ((uint8_t)PWINDOW->m_sFullscreenState.client & (uint8_t)~MODE)));
|
(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 void checkDefaultCursorWarp(PHLMONITOR monitor) {
|
||||||
static auto PCURSORMONITOR = CConfigValue<std::string>("cursor:default_monitor");
|
static auto PCURSORMONITOR = CConfigValue<std::string>("cursor:default_monitor");
|
||||||
static bool cursorDefaultDone = false;
|
static bool cursorDefaultDone = false;
|
||||||
|
|
|
@ -140,7 +140,6 @@ class CCompositor {
|
||||||
void setWindowFullscreenInternal(const PHLWINDOW PWINDOW, const eFullscreenMode MODE);
|
void setWindowFullscreenInternal(const PHLWINDOW PWINDOW, const eFullscreenMode MODE);
|
||||||
void setWindowFullscreenClient(const PHLWINDOW PWINDOW, const eFullscreenMode MODE);
|
void setWindowFullscreenClient(const PHLWINDOW PWINDOW, const eFullscreenMode MODE);
|
||||||
void setWindowFullscreenState(const PHLWINDOW PWINDOW, const SFullscreenState state);
|
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 changeWindowFullscreenModeClient(const PHLWINDOW PWINDOW, const eFullscreenMode MODE, const bool ON);
|
||||||
void updateFullscreenFadeOnWorkspace(PHLWORKSPACE);
|
void updateFullscreenFadeOnWorkspace(PHLWORKSPACE);
|
||||||
PHLWINDOW getX11Parent(PHLWINDOW);
|
PHLWINDOW getX11Parent(PHLWINDOW);
|
||||||
|
@ -167,7 +166,6 @@ class CCompositor {
|
||||||
void setPreferredScaleForSurface(SP<CWLSurfaceResource> pSurface, double scale);
|
void setPreferredScaleForSurface(SP<CWLSurfaceResource> pSurface, double scale);
|
||||||
void setPreferredTransformForSurface(SP<CWLSurfaceResource> pSurface, wl_output_transform transform);
|
void setPreferredTransformForSurface(SP<CWLSurfaceResource> pSurface, wl_output_transform transform);
|
||||||
void updateSuspendedStates();
|
void updateSuspendedStates();
|
||||||
PHLWINDOW windowForCPointer(CWindow*);
|
|
||||||
void onNewMonitor(SP<Aquamarine::IOutput> output);
|
void onNewMonitor(SP<Aquamarine::IOutput> output);
|
||||||
|
|
||||||
std::string explicitConfigPath;
|
std::string explicitConfigPath;
|
||||||
|
|
|
@ -1483,22 +1483,6 @@ void CConfigManager::dispatchExecShutdown() {
|
||||||
handleExecShutdown("", "hyprctl dispatch exit");
|
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() {
|
void CConfigManager::performMonitorReload() {
|
||||||
|
|
||||||
bool overAgain = false;
|
bool overAgain = false;
|
||||||
|
@ -1718,10 +1702,6 @@ std::unordered_map<std::string, SAnimationPropertyConfig> CConfigManager::getAni
|
||||||
return animationConfig;
|
return animationConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
void onPluginLoadUnload(const std::string& name, bool load) {
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
void CConfigManager::addPluginConfigVar(HANDLE handle, const std::string& name, const Hyprlang::CConfigValue& value) {
|
void CConfigManager::addPluginConfigVar(HANDLE handle, const std::string& name, const Hyprlang::CConfigValue& value) {
|
||||||
if (!name.starts_with("plugin:"))
|
if (!name.starts_with("plugin:"))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -163,7 +163,6 @@ class CConfigManager {
|
||||||
|
|
||||||
void* const* getConfigValuePtr(const std::string&);
|
void* const* getConfigValuePtr(const std::string&);
|
||||||
Hyprlang::CConfigValue* getHyprlangConfigValuePtr(const std::string& name, const std::string& specialCat = "");
|
Hyprlang::CConfigValue* getHyprlangConfigValuePtr(const std::string& name, const std::string& specialCat = "");
|
||||||
void onPluginLoadUnload(const std::string& name, bool load);
|
|
||||||
static std::string getMainConfigPath();
|
static std::string getMainConfigPath();
|
||||||
std::string getConfigString();
|
std::string getConfigString();
|
||||||
|
|
||||||
|
@ -193,8 +192,6 @@ class CConfigManager {
|
||||||
void dispatchExecShutdown();
|
void dispatchExecShutdown();
|
||||||
|
|
||||||
void performMonitorReload();
|
void performMonitorReload();
|
||||||
void appendMonitorRule(const SMonitorRule&);
|
|
||||||
bool replaceMonitorRule(const SMonitorRule&);
|
|
||||||
void ensureMonitorStatus();
|
void ensureMonitorStatus();
|
||||||
void ensureVRR(PHLMONITOR pMonitor = nullptr);
|
void ensureVRR(PHLMONITOR pMonitor = nullptr);
|
||||||
|
|
||||||
|
|
|
@ -473,15 +473,6 @@ PHLWINDOW CWindow::x11TransientFor() {
|
||||||
return nullptr;
|
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) {
|
void unregisterVar(void* ptr) {
|
||||||
((CBaseAnimatedVariable*)ptr)->unregister();
|
((CBaseAnimatedVariable*)ptr)->unregister();
|
||||||
}
|
}
|
||||||
|
|
|
@ -399,7 +399,6 @@ class CWindow {
|
||||||
bool checkInputOnDecos(const eInputType, const Vector2D&, std::any = {});
|
bool checkInputOnDecos(const eInputType, const Vector2D&, std::any = {});
|
||||||
pid_t getPID();
|
pid_t getPID();
|
||||||
IHyprWindowDecoration* getDecorationByType(eDecorationType);
|
IHyprWindowDecoration* getDecorationByType(eDecorationType);
|
||||||
void removeDecorationByType(eDecorationType);
|
|
||||||
void updateToplevel();
|
void updateToplevel();
|
||||||
void updateSurfaceScaleTransformDetails(bool force = false);
|
void updateSurfaceScaleTransformDetails(bool force = false);
|
||||||
void moveToWorkspace(PHLWORKSPACE);
|
void moveToWorkspace(PHLWORKSPACE);
|
||||||
|
|
|
@ -872,15 +872,6 @@ void Events::listener_destroyWindow(void* owner, void* data) {
|
||||||
PWINDOW->listeners.commit.reset();
|
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) {
|
void Events::listener_activateX11(void* owner, void* data) {
|
||||||
PHLWINDOW PWINDOW = ((CWindow*)owner)->m_pSelf.lock();
|
PHLWINDOW PWINDOW = ((CWindow*)owner)->m_pSelf.lock();
|
||||||
|
|
||||||
|
|
|
@ -55,11 +55,6 @@ void CBaseAnimatedVariable::registerVar() {
|
||||||
m_bIsRegistered = true;
|
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() {
|
float CBaseAnimatedVariable::getPercent() {
|
||||||
const auto DURATIONPASSED = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - animationBegin).count();
|
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);
|
return std::clamp((DURATIONPASSED / 100.f) / m_pConfig->pValues->internalSpeed, 0.f, 1.f);
|
||||||
|
|
|
@ -95,8 +95,6 @@ class CBaseAnimatedVariable {
|
||||||
return m_pConfig;
|
return m_pConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getDurationLeftMs();
|
|
||||||
|
|
||||||
/* returns the spent (completion) % */
|
/* returns the spent (completion) % */
|
||||||
float getPercent();
|
float getPercent();
|
||||||
|
|
||||||
|
|
|
@ -161,26 +161,6 @@ std::string absolutePath(const std::string& rawpath, const std::string& currentP
|
||||||
return value;
|
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::string escapeJSONStrings(const std::string& str) {
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
for (auto const& c : str) {
|
for (auto const& c : str) {
|
||||||
|
|
|
@ -21,8 +21,6 @@ struct SWorkspaceIDName {
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string absolutePath(const std::string&, const std::string&);
|
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);
|
std::string escapeJSONStrings(const std::string& str);
|
||||||
bool isDirection(const std::string&);
|
bool isDirection(const std::string&);
|
||||||
bool isDirection(const char&);
|
bool isDirection(const char&);
|
||||||
|
|
|
@ -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 CHyprDwindleLayout::getNodesOnWorkspace(const WORKSPACEID& id) {
|
||||||
int no = 0;
|
int no = 0;
|
||||||
for (auto const& n : m_lDwindleNodesData) {
|
for (auto const& n : m_lDwindleNodesData) {
|
||||||
|
@ -804,15 +796,6 @@ void CHyprDwindleLayout::recalculateWindow(PHLWINDOW pWindow) {
|
||||||
PNODE->recalcSizePosRecursive();
|
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) {
|
SWindowRenderLayoutHints CHyprDwindleLayout::requestRenderHints(PHLWINDOW pWindow) {
|
||||||
// window should be valid, insallah
|
// window should be valid, insallah
|
||||||
SWindowRenderLayoutHints hints;
|
SWindowRenderLayoutHints hints;
|
||||||
|
|
|
@ -39,7 +39,6 @@ struct SDwindleNodeData {
|
||||||
}
|
}
|
||||||
|
|
||||||
void recalcSizePosRecursive(bool force = false, bool horizontalOverride = false, bool verticalOverride = false);
|
void recalcSizePosRecursive(bool force = false, bool horizontalOverride = false, bool verticalOverride = false);
|
||||||
void getAllChildrenRecursive(std::vector<SDwindleNodeData*>*);
|
|
||||||
CHyprDwindleLayout* layout = nullptr;
|
CHyprDwindleLayout* layout = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
void CInputMethodRelay::removePopup(CInputPopup* pPopup) {
|
||||||
std::erase_if(m_vIMEPopups, [pPopup](const auto& other) { return other.get() == pPopup; });
|
std::erase_if(m_vIMEPopups, [pPopup](const auto& other) { return other.get() == pPopup; });
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@ class CInputMethodRelay {
|
||||||
|
|
||||||
CTextInput* getFocusedTextInput();
|
CTextInput* getFocusedTextInput();
|
||||||
|
|
||||||
void setIMEPopupFocus(CInputPopup*, SP<CWLSurfaceResource>);
|
|
||||||
void removePopup(CInputPopup*);
|
void removePopup(CInputPopup*);
|
||||||
|
|
||||||
CInputPopup* popupFromCoords(const Vector2D& point);
|
CInputPopup* popupFromCoords(const Vector2D& point);
|
||||||
|
|
|
@ -43,7 +43,6 @@ class CWLSHMBuffer : public IHLBuffer {
|
||||||
virtual void endDataPtr();
|
virtual void endDataPtr();
|
||||||
|
|
||||||
bool good();
|
bool good();
|
||||||
void updateTexture();
|
|
||||||
|
|
||||||
int32_t offset = 0, stride = 0;
|
int32_t offset = 0, stride = 0;
|
||||||
uint32_t fmt = 0;
|
uint32_t fmt = 0;
|
||||||
|
|
|
@ -71,10 +71,6 @@ bool CDMABuffer::good() {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDMABuffer::updateTexture() {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CDMABuffer::closeFDs() {
|
void CDMABuffer::closeFDs() {
|
||||||
for (int i = 0; i < attrs.planes; ++i) {
|
for (int i = 0; i < attrs.planes; ++i) {
|
||||||
if (attrs.fds[i] == -1)
|
if (attrs.fds[i] == -1)
|
||||||
|
|
|
@ -15,7 +15,6 @@ class CDMABuffer : public IHLBuffer {
|
||||||
virtual std::tuple<uint8_t*, uint32_t, size_t> beginDataPtr(uint32_t flags);
|
virtual std::tuple<uint8_t*, uint32_t, size_t> beginDataPtr(uint32_t flags);
|
||||||
virtual void endDataPtr();
|
virtual void endDataPtr();
|
||||||
bool good();
|
bool good();
|
||||||
void updateTexture();
|
|
||||||
void closeFDs();
|
void closeFDs();
|
||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
|
@ -2142,13 +2142,6 @@ void CHyprOpenGLImpl::renderTextureWithBlur(SP<CTexture> tex, CBox* pBox, float
|
||||||
scissor((CBox*)nullptr);
|
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) {
|
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((box->width > 0 && box->height > 0), "Tried to render rect with width/height < 0!");
|
||||||
RASSERT(m_RenderData.pMonitor, "Tried to render rect without begin()!");
|
RASSERT(m_RenderData.pMonitor, "Tried to render rect without begin()!");
|
||||||
|
|
Loading…
Reference in a new issue