mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2026-05-09 04:08:01 +02:00
hyprbars: chase hyprland
This commit is contained in:
parent
6904c6dac5
commit
0ca682bc2c
1 changed files with 6 additions and 6 deletions
|
|
@ -77,8 +77,8 @@ std::string CHyprBar::getDisplayName() {
|
|||
}
|
||||
|
||||
bool CHyprBar::inputIsValid() {
|
||||
if (!m_pWindow->m_workspace || !m_pWindow->m_workspace->isVisible() || !g_pInputManager->m_dExclusiveLSes.empty() ||
|
||||
(g_pSeatManager->seatGrab && !g_pSeatManager->seatGrab->accepts(m_pWindow->m_wlSurface->resource())))
|
||||
if (!m_pWindow->m_workspace || !m_pWindow->m_workspace->isVisible() || !g_pInputManager->m_exclusiveLSes.empty() ||
|
||||
(g_pSeatManager->m_seatGrab && !g_pSeatManager->m_seatGrab->accepts(m_pWindow->m_wlSurface->resource())))
|
||||
return false;
|
||||
|
||||
const auto WINDOWATCURSOR = g_pCompositor->vectorToWindowUnified(g_pInputManager->getMouseCoordsInternal(), RESERVED_EXTENTS | INPUT_EXTENTS | ALLOW_FLOATING);
|
||||
|
|
@ -155,7 +155,7 @@ void CHyprBar::handleDownEvent(SCallbackInfo& info, std::optional<ITouch::SDownE
|
|||
g_pCompositor->warpCursorTo(Vector2D(e.pos.x, e.pos.y));
|
||||
g_pInputManager->mouseMoveUnified(e.timeMs);
|
||||
}
|
||||
g_pKeybindManager->m_mDispatchers["mouse"]("0movewindow");
|
||||
g_pKeybindManager->m_dispatchers["mouse"]("0movewindow");
|
||||
Debug::log(LOG, "[hyprbars] Dragging ended on {:x}", (uintptr_t)PWINDOW.get());
|
||||
}
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ void CHyprBar::handleUpEvent(SCallbackInfo& info) {
|
|||
m_bCancelledDown = false;
|
||||
|
||||
if (m_bDraggingThis) {
|
||||
g_pKeybindManager->m_mDispatchers["mouse"]("0movewindow");
|
||||
g_pKeybindManager->m_dispatchers["mouse"]("0movewindow");
|
||||
m_bDraggingThis = false;
|
||||
|
||||
Debug::log(LOG, "[hyprbars] Dragging ended on {:x}", (uintptr_t)m_pWindow.lock().get());
|
||||
|
|
@ -199,7 +199,7 @@ void CHyprBar::handleUpEvent(SCallbackInfo& info) {
|
|||
}
|
||||
|
||||
void CHyprBar::handleMovement() {
|
||||
g_pKeybindManager->m_mDispatchers["mouse"]("1movewindow");
|
||||
g_pKeybindManager->m_dispatchers["mouse"]("1movewindow");
|
||||
m_bDraggingThis = true;
|
||||
Debug::log(LOG, "[hyprbars] Dragging initiated on {:x}", (uintptr_t)m_pWindow.lock().get());
|
||||
return;
|
||||
|
|
@ -215,7 +215,7 @@ bool CHyprBar::doButtonPress(Hyprlang::INT* const* PBARPADDING, Hyprlang::INT* c
|
|||
|
||||
if (VECINRECT(COORDS, currentPos.x, currentPos.y, currentPos.x + b.size + **PBARBUTTONPADDING, currentPos.y + b.size)) {
|
||||
// hit on close
|
||||
g_pKeybindManager->m_mDispatchers["exec"](b.cmd);
|
||||
g_pKeybindManager->m_dispatchers["exec"](b.cmd);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue