From 0ec30b6d20665837b3cbd65b1cd4463535185126 Mon Sep 17 00:00:00 2001 From: caffeine01 Date: Wed, 11 Dec 2024 19:53:08 +0000 Subject: [PATCH] remove commented code --- hyprbars/barDeco.cpp | 14 -------------- hyprbars/barDeco.hpp | 24 +++++++++++------------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/hyprbars/barDeco.cpp b/hyprbars/barDeco.cpp index b463f13..e71a314 100644 --- a/hyprbars/barDeco.cpp +++ b/hyprbars/barDeco.cpp @@ -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(param)); }); - */ - m_pMouseMoveCallback = HyprlandAPI::registerCallbackDynamic(PHANDLE, "mouseMove", [&](void* self, SCallbackInfo& info, std::any param) { onMouseMove(std::any_cast(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; diff --git a/hyprbars/barDeco.hpp b/hyprbars/barDeco.hpp index ede0711..e84c089 100644 --- a/hyprbars/barDeco.hpp +++ b/hyprbars/barDeco.hpp @@ -62,22 +62,20 @@ 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); - CBox assignedBoxGlobal(); + void onTouchDown(SCallbackInfo& info); + void doButtonPress(Vector2D coords); + void onMouseMove(Vector2D coords); + CBox assignedBoxGlobal(); - SP m_pMouseButtonCallback; - SP m_pTouchDownCallback; - /* SP m_pTipDownCallback; */ - SP m_pMouseMoveCallback; + SP m_pMouseButtonCallback; + SP m_pTouchDownCallback; + SP m_pMouseMoveCallback; - std::string m_szLastTitle; + std::string m_szLastTitle; - bool m_bDraggingThis = false; - bool m_bDragPending = false; - bool m_bCancelledDown = false; + bool m_bDraggingThis = false; + bool m_bDragPending = false; + bool m_bCancelledDown = false; // for dynamic updates int m_iLastHeight = 0;