diff --git a/easymotionDeco.cpp b/easymotionDeco.cpp index 0e40cfd..85df59c 100644 --- a/easymotionDeco.cpp +++ b/easymotionDeco.cpp @@ -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(layoutWidth), static_cast(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(layoutWidth), static_cast(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); diff --git a/easymotionDeco.hpp b/easymotionDeco.hpp index 52aa8e5..23926f7 100644 --- a/easymotionDeco.hpp +++ b/easymotionDeco.hpp @@ -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(); diff --git a/main.cpp b/main.cpp index 1508190..4f13f3e 100644 --- a/main.cpp +++ b/main.cpp @@ -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); }