Chase hyprland
This commit is contained in:
@@ -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))
|
if (!validMapped(m_pWindow))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ void CHyprEasyLabel::draw(PHLMONITOR pMonitor, float a) {
|
|||||||
if (!m_tTextTex.get()) {
|
if (!m_tTextTex.get()) {
|
||||||
renderMotionString(TEXTBUF, pMonitor->scale);
|
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();
|
motionBox.translate(pMonitor->vecPosition*-1).scale(pMonitor->scale).round();
|
||||||
|
|
||||||
if (motionBox.w < 1 || motionBox.h < 1)
|
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);
|
g_pHyprOpenGL->renderRect(&motionBox, m_cBackgroundColor, scaledRounding);
|
||||||
|
|
||||||
if (m_iBorderSize) {
|
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();
|
borderBox.translate(pMonitor->vecPosition*-1).scale(pMonitor->scale).round();
|
||||||
if (borderBox.w >= 1 && borderBox.h >= 1) {
|
if (borderBox.w >= 1 && borderBox.h >= 1) {
|
||||||
g_pHyprOpenGL->renderBorder(&borderBox, m_cBorderGradient, scaledRounding, m_iBorderSize * pMonitor->scale, a);
|
g_pHyprOpenGL->renderBorder(&borderBox, m_cBorderGradient, scaledRounding, m_iBorderSize * pMonitor->scale, a);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class CHyprEasyLabel : public IHyprWindowDecoration {
|
|||||||
|
|
||||||
virtual void onPositioningReply(const SDecorationPositioningReply& reply);
|
virtual void onPositioningReply(const SDecorationPositioningReply& reply);
|
||||||
|
|
||||||
virtual void draw(PHLMONITOR, float a);
|
virtual void draw(PHLMONITOR, float const &a);
|
||||||
|
|
||||||
virtual eDecorationType getDecorationType();
|
virtual eDecorationType getDecorationType();
|
||||||
|
|
||||||
|
|||||||
8
main.cpp
8
main.cpp
@@ -130,7 +130,7 @@ void easymotionDispatch(std::string args)
|
|||||||
actionDesc.motionKeys = *MOTIONKEYS;
|
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, ':');
|
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->m_pWorkspace == m->activeWorkspace || m->activeSpecialWorkspace == w->m_pWorkspace) {
|
||||||
if (w->isHidden() || !w->m_bIsMapped || w->m_bFadingOut)
|
if (w->isHidden() || !w->m_bIsMapped || w->m_bFadingOut)
|
||||||
continue;
|
continue;
|
||||||
if (w->m_pWorkspace->m_bHasFullscreenWindow && g_pCompositor->getFullscreenWindowOnWorkspace(w->workspaceID()) != w)
|
if (w->m_pWorkspace->m_bHasFullscreenWindow &&
|
||||||
continue;
|
g_pCompositor->getFullscreenWindowOnWorkspace(w->workspaceID()) != w) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
std::string lstr = actionDesc.motionKeys.substr(key_idx++, 1);
|
std::string lstr = actionDesc.motionKeys.substr(key_idx++, 1);
|
||||||
addLabelToWindow(w, &actionDesc, lstr);
|
addLabelToWindow(w, &actionDesc, lstr);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user