remove commented code

This commit is contained in:
caffeine01 2024-12-11 19:53:08 +00:00
parent 0a7a76ee69
commit 0ec30b6d20
2 changed files with 11 additions and 27 deletions

View file

@ -18,11 +18,6 @@ CHyprBar::CHyprBar(PHLWINDOW pWindow) : IHyprWindowDecoration(pWindow) {
m_pTouchDownCallback = HyprlandAPI::registerCallbackDynamic(PHANDLE, "touchDown", [&](void* self, SCallbackInfo& info, std::any param) { onTouchDown(info); });
/* Not implemented (yet)
m_pTipDownCallback = HyprlandAPI::registerCallbackDynamic(PHANDLE, "tabletTip",
[&](void* self, SCallbackInfo& info, std::any param) { onTipDown(info, std::any_cast<CTablet::STipEvent>(param)); });
*/
m_pMouseMoveCallback =
HyprlandAPI::registerCallbackDynamic(PHANDLE, "mouseMove", [&](void* self, SCallbackInfo& info, std::any param) { onMouseMove(std::any_cast<Vector2D>(param)); });
@ -34,7 +29,6 @@ CHyprBar::~CHyprBar() {
damageEntire();
HyprlandAPI::unregisterCallback(PHANDLE, m_pMouseButtonCallback);
HyprlandAPI::unregisterCallback(PHANDLE, m_pTouchDownCallback);
/* HyprlandAPI::unregisterCallback(PHANDLE, m_pTipDownCallback); */
HyprlandAPI::unregisterCallback(PHANDLE, m_pMouseMoveCallback);
std::erase(g_pGlobalState->bars, this);
}
@ -126,14 +120,6 @@ void CHyprBar::onTouchDown(SCallbackInfo& info) {
CHyprBar::doButtonPress(COORDS);
}
/*
void CHyprBar::onTipDown(SCallbackInfo& info, CTablet::STipEvent e) {
if (!e.in)
return;
CHyprBar::doButtonPress(cursorRelativeToBar());
}
*/
void CHyprBar::doButtonPress(Vector2D coords) {
if (m_pWindow.lock() != g_pCompositor->m_pLastWindow.lock())
return;

View file

@ -62,7 +62,6 @@ class CHyprBar : public IHyprWindowDecoration {
void renderBarButtons(const Vector2D& bufferSize, const float scale);
void renderBarButtonsText(CBox* barBox, const float scale, const float a);
void onMouseDown(SCallbackInfo& info, IPointer::SButtonEvent e);
/* void onTipDown(SCallbackInfo& info, CTablet::STipEvent e); */
void onTouchDown(SCallbackInfo& info);
void doButtonPress(Vector2D coords);
void onMouseMove(Vector2D coords);
@ -70,7 +69,6 @@ class CHyprBar : public IHyprWindowDecoration {
SP<HOOK_CALLBACK_FN> m_pMouseButtonCallback;
SP<HOOK_CALLBACK_FN> m_pTouchDownCallback;
/* SP<HOOK_CALLBACK_FN> m_pTipDownCallback; */
SP<HOOK_CALLBACK_FN> m_pMouseMoveCallback;
std::string m_szLastTitle;