Chase hyprland

This commit is contained in:
zooeywm
2024-11-20 15:39:10 +08:00
committed by Zakk
parent 02b03c91e3
commit 3388351d2a
3 changed files with 9 additions and 7 deletions

View File

@@ -108,7 +108,7 @@ void CHyprEasyLabel::renderMotionString(Vector2D& bufferSize, const float scale)
}
void CHyprEasyLabel::draw(PHLMONITOR pMonitor, float a) {
void CHyprEasyLabel::draw(PHLMONITOR pMonitor, float const &a) {
if (!validMapped(m_pWindow))
return;
@@ -134,7 +134,7 @@ void CHyprEasyLabel::draw(PHLMONITOR pMonitor, float a) {
if (!m_tTextTex.get()) {
renderMotionString(TEXTBUF, pMonitor->scale);
}
CBox motionBox = {DECOBOX.x, DECOBOX.y, layoutWidth, layoutHeight};
CBox motionBox = {DECOBOX.x, DECOBOX.y, static_cast<double>(layoutWidth), static_cast<double>(layoutHeight)};
motionBox.translate(pMonitor->vecPosition*-1).scale(pMonitor->scale).round();
if (motionBox.w < 1 || motionBox.h < 1)
@@ -143,7 +143,7 @@ void CHyprEasyLabel::draw(PHLMONITOR pMonitor, float a) {
g_pHyprOpenGL->renderRect(&motionBox, m_cBackgroundColor, scaledRounding);
if (m_iBorderSize) {
CBox borderBox = {DECOBOX.x, DECOBOX.y, layoutWidth, layoutHeight};
CBox borderBox = {DECOBOX.x, DECOBOX.y, static_cast<double>(layoutWidth), static_cast<double>(layoutHeight)};
borderBox.translate(pMonitor->vecPosition*-1).scale(pMonitor->scale).round();
if (borderBox.w >= 1 && borderBox.h >= 1) {
g_pHyprOpenGL->renderBorder(&borderBox, m_cBorderGradient, scaledRounding, m_iBorderSize * pMonitor->scale, a);

View File

@@ -17,7 +17,7 @@ class CHyprEasyLabel : public IHyprWindowDecoration {
virtual void onPositioningReply(const SDecorationPositioningReply& reply);
virtual void draw(PHLMONITOR, float a);
virtual void draw(PHLMONITOR, float const &a);
virtual eDecorationType getDecorationType();

View File

@@ -130,7 +130,7 @@ void easymotionDispatch(std::string args)
actionDesc.motionKeys = *MOTIONKEYS;
for(int i = 0; i < emargs.size(); i++)
for(size_t i = 0; i < emargs.size(); i++)
{
CVarList kv(emargs[i], 2, ':');
@@ -171,8 +171,10 @@ void easymotionDispatch(std::string args)
if (w->m_pWorkspace == m->activeWorkspace || m->activeSpecialWorkspace == w->m_pWorkspace) {
if (w->isHidden() || !w->m_bIsMapped || w->m_bFadingOut)
continue;
if (w->m_pWorkspace->m_bHasFullscreenWindow && g_pCompositor->getFullscreenWindowOnWorkspace(w->workspaceID()) != w)
continue;
if (w->m_pWorkspace->m_bHasFullscreenWindow &&
g_pCompositor->getFullscreenWindowOnWorkspace(w->workspaceID()) != w) {
continue;
}
std::string lstr = actionDesc.motionKeys.substr(key_idx++, 1);
addLabelToWindow(w, &actionDesc, lstr);
}