mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2024-12-23 07:19:49 +01:00
remove commented code
This commit is contained in:
parent
0a7a76ee69
commit
0ec30b6d20
2 changed files with 11 additions and 27 deletions
|
@ -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); });
|
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 =
|
m_pMouseMoveCallback =
|
||||||
HyprlandAPI::registerCallbackDynamic(PHANDLE, "mouseMove", [&](void* self, SCallbackInfo& info, std::any param) { onMouseMove(std::any_cast<Vector2D>(param)); });
|
HyprlandAPI::registerCallbackDynamic(PHANDLE, "mouseMove", [&](void* self, SCallbackInfo& info, std::any param) { onMouseMove(std::any_cast<Vector2D>(param)); });
|
||||||
|
|
||||||
|
@ -34,7 +29,6 @@ CHyprBar::~CHyprBar() {
|
||||||
damageEntire();
|
damageEntire();
|
||||||
HyprlandAPI::unregisterCallback(PHANDLE, m_pMouseButtonCallback);
|
HyprlandAPI::unregisterCallback(PHANDLE, m_pMouseButtonCallback);
|
||||||
HyprlandAPI::unregisterCallback(PHANDLE, m_pTouchDownCallback);
|
HyprlandAPI::unregisterCallback(PHANDLE, m_pTouchDownCallback);
|
||||||
/* HyprlandAPI::unregisterCallback(PHANDLE, m_pTipDownCallback); */
|
|
||||||
HyprlandAPI::unregisterCallback(PHANDLE, m_pMouseMoveCallback);
|
HyprlandAPI::unregisterCallback(PHANDLE, m_pMouseMoveCallback);
|
||||||
std::erase(g_pGlobalState->bars, this);
|
std::erase(g_pGlobalState->bars, this);
|
||||||
}
|
}
|
||||||
|
@ -126,14 +120,6 @@ void CHyprBar::onTouchDown(SCallbackInfo& info) {
|
||||||
CHyprBar::doButtonPress(COORDS);
|
CHyprBar::doButtonPress(COORDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void CHyprBar::onTipDown(SCallbackInfo& info, CTablet::STipEvent e) {
|
|
||||||
if (!e.in)
|
|
||||||
return;
|
|
||||||
CHyprBar::doButtonPress(cursorRelativeToBar());
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void CHyprBar::doButtonPress(Vector2D coords) {
|
void CHyprBar::doButtonPress(Vector2D coords) {
|
||||||
if (m_pWindow.lock() != g_pCompositor->m_pLastWindow.lock())
|
if (m_pWindow.lock() != g_pCompositor->m_pLastWindow.lock())
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -62,22 +62,20 @@ class CHyprBar : public IHyprWindowDecoration {
|
||||||
void renderBarButtons(const Vector2D& bufferSize, const float scale);
|
void renderBarButtons(const Vector2D& bufferSize, const float scale);
|
||||||
void renderBarButtonsText(CBox* barBox, const float scale, const float a);
|
void renderBarButtonsText(CBox* barBox, const float scale, const float a);
|
||||||
void onMouseDown(SCallbackInfo& info, IPointer::SButtonEvent e);
|
void onMouseDown(SCallbackInfo& info, IPointer::SButtonEvent e);
|
||||||
/* void onTipDown(SCallbackInfo& info, CTablet::STipEvent e); */
|
void onTouchDown(SCallbackInfo& info);
|
||||||
void onTouchDown(SCallbackInfo& info);
|
void doButtonPress(Vector2D coords);
|
||||||
void doButtonPress(Vector2D coords);
|
void onMouseMove(Vector2D coords);
|
||||||
void onMouseMove(Vector2D coords);
|
CBox assignedBoxGlobal();
|
||||||
CBox assignedBoxGlobal();
|
|
||||||
|
|
||||||
SP<HOOK_CALLBACK_FN> m_pMouseButtonCallback;
|
SP<HOOK_CALLBACK_FN> m_pMouseButtonCallback;
|
||||||
SP<HOOK_CALLBACK_FN> m_pTouchDownCallback;
|
SP<HOOK_CALLBACK_FN> m_pTouchDownCallback;
|
||||||
/* SP<HOOK_CALLBACK_FN> m_pTipDownCallback; */
|
SP<HOOK_CALLBACK_FN> m_pMouseMoveCallback;
|
||||||
SP<HOOK_CALLBACK_FN> m_pMouseMoveCallback;
|
|
||||||
|
|
||||||
std::string m_szLastTitle;
|
std::string m_szLastTitle;
|
||||||
|
|
||||||
bool m_bDraggingThis = false;
|
bool m_bDraggingThis = false;
|
||||||
bool m_bDragPending = false;
|
bool m_bDragPending = false;
|
||||||
bool m_bCancelledDown = false;
|
bool m_bCancelledDown = false;
|
||||||
|
|
||||||
// for dynamic updates
|
// for dynamic updates
|
||||||
int m_iLastHeight = 0;
|
int m_iLastHeight = 0;
|
||||||
|
|
Loading…
Reference in a new issue