Skip to content

Commit

Permalink
all: chase hyprland
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Jan 26, 2025
1 parent 7634792 commit bf3ec04
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions borders-plus-plus/borderDeco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ void CBordersPlusPlus::drawPass(PHLMONITOR pMonitor, const float& a) {
if (fullBox.width < 1 || fullBox.height < 1)
break;

g_pHyprOpenGL->scissor((CBox*)nullptr);
g_pHyprOpenGL->scissor(nullptr);

g_pHyprOpenGL->renderBorder(&fullBox, CHyprColor{(uint64_t)**PCOLORS[i]}, **PNATURALROUND ? ORIGINALROUND : rounding, ROUNDINGPOWER, THISBORDERSIZE, a,
g_pHyprOpenGL->renderBorder(fullBox, CHyprColor{(uint64_t)**PCOLORS[i]}, **PNATURALROUND ? ORIGINALROUND : rounding, ROUNDINGPOWER, THISBORDERSIZE, a,
**PNATURALROUND ? ORIGINALROUND : -1);
}

Expand All @@ -164,5 +164,5 @@ void CBordersPlusPlus::updateWindow(PHLWINDOW pWindow) {

void CBordersPlusPlus::damageEntire() {
CBox dm = m_bLastRelativeBox.copy().translate(m_vLastWindowPos).expand(2);
g_pHyprRenderer->damageBox(&dm);
g_pHyprRenderer->damageBox(dm);
}
16 changes: 8 additions & 8 deletions hyprbars/barDeco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ void CHyprBar::renderBarButtonsText(CBox* barBox, const float scale, const float
CBox pos = {barBox->x + (BUTTONSRIGHT ? barBox->width - offset - scaledButtonSize : offset), barBox->y + (barBox->height - scaledButtonSize) / 2.0, scaledButtonSize,
scaledButtonSize};

g_pHyprOpenGL->renderTexture(button.iconTex, &pos, a);
g_pHyprOpenGL->renderTexture(button.iconTex, pos, a);
offset += scaledButtonsPad + scaledButtonSize;
}
}
Expand Down Expand Up @@ -511,7 +511,7 @@ void CHyprBar::renderPass(PHLMONITOR pMonitor, const float& a) {
if (titleBarBox.w < 1 || titleBarBox.h < 1)
return;

g_pHyprOpenGL->scissor(&titleBarBox);
g_pHyprOpenGL->scissor(titleBarBox);

if (ROUNDING) {
// the +1 is a shit garbage temp fix until renderRect supports an alpha matte
Expand All @@ -533,17 +533,17 @@ void CHyprBar::renderPass(PHLMONITOR pMonitor, const float& a) {
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);

windowBox.translate(WORKSPACEOFFSET).scale(pMonitor->scale).round();
g_pHyprOpenGL->renderRect(&windowBox, CHyprColor(0, 0, 0, 0), scaledRounding);
g_pHyprOpenGL->renderRect(windowBox, CHyprColor(0, 0, 0, 0), scaledRounding);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);

glStencilFunc(GL_NOTEQUAL, 1, -1);
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
}

if (SHOULDBLUR)
g_pHyprOpenGL->renderRectWithBlur(&titleBarBox, color, scaledRounding, a);
g_pHyprOpenGL->renderRectWithBlur(titleBarBox, color, scaledRounding, a);
else
g_pHyprOpenGL->renderRect(&titleBarBox, color, scaledRounding);
g_pHyprOpenGL->renderRect(titleBarBox, color, scaledRounding);

// render title
if (**PENABLETITLE && (m_szLastTitle != PWINDOW->m_szTitle || m_bWindowSizeChanged || m_pTextTex->m_iTexID == 0 || m_bTitleColorChanged)) {
Expand All @@ -562,16 +562,16 @@ void CHyprBar::renderPass(PHLMONITOR pMonitor, const float& a) {

CBox textBox = {titleBarBox.x, titleBarBox.y, (int)BARBUF.x, (int)BARBUF.y};
if (**PENABLETITLE)
g_pHyprOpenGL->renderTexture(m_pTextTex, &textBox, a);
g_pHyprOpenGL->renderTexture(m_pTextTex, textBox, a);

if (m_bButtonsDirty || m_bWindowSizeChanged) {
renderBarButtons(BARBUF, pMonitor->scale);
m_bButtonsDirty = false;
}

g_pHyprOpenGL->renderTexture(m_pButtonsTex, &textBox, a);
g_pHyprOpenGL->renderTexture(m_pButtonsTex, textBox, a);

g_pHyprOpenGL->scissor((CBox*)nullptr);
g_pHyprOpenGL->scissor(nullptr);

renderBarButtonsText(&textBox, pMonitor->scale, a);

Expand Down
4 changes: 2 additions & 2 deletions hyprexpo/overview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ void COverview::onDamageReported() {
damage();

blockDamageReporting = true;
g_pHyprRenderer->damageBox(&texbox);
g_pHyprRenderer->damageBox(texbox);
blockDamageReporting = false;
g_pCompositor->scheduleFrameForMonitor(pMonitor.lock());
}
Expand Down Expand Up @@ -409,7 +409,7 @@ void COverview::fullRender() {
texbox.scale(pMonitor->scale).translate(pos->value());
texbox.round();
CRegion damage{0, 0, INT16_MAX, INT16_MAX};
g_pHyprOpenGL->renderTextureInternalWithDamage(images[x + y * SIDE_LENGTH].fb.getTexture(), &texbox, 1.0, damage);
g_pHyprOpenGL->renderTextureInternalWithDamage(images[x + y * SIDE_LENGTH].fb.getTexture(), texbox, 1.0, damage);
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions hyprtrails/trail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void CTrail::onTick() {
}

if (m_bNeedsDamage) {
g_pHyprRenderer->damageBox(&m_bLastBox);
g_pHyprRenderer->damageBox(m_bLastBox);
m_bNeedsDamage = false;
}
}
Expand Down Expand Up @@ -110,7 +110,7 @@ void CTrail::renderPass(PHLMONITOR pMonitor, const float& a) {
CBox wlrbox = {thisbox.x - pMonitor->vecPosition.x, thisbox.y - pMonitor->vecPosition.y, thisbox.w, thisbox.h};
wlrbox.scale(pMonitor->scale).round();

g_pHyprOpenGL->scissor((CBox*)nullptr); // allow the entire window and stencil to render
g_pHyprOpenGL->scissor(nullptr); // allow the entire window and stencil to render
glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT);

Expand All @@ -120,7 +120,7 @@ void CTrail::renderPass(PHLMONITOR pMonitor, const float& a) {
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);

glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
g_pHyprOpenGL->renderRect(&wlrbox, CHyprColor(0, 0, 0, 0), PWINDOW->rounding() * pMonitor->scale, PWINDOW->roundingPower());
g_pHyprOpenGL->renderRect(wlrbox, CHyprColor(0, 0, 0, 0), PWINDOW->rounding() * pMonitor->scale, PWINDOW->roundingPower());
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);

glStencilFunc(GL_NOTEQUAL, 1, -1);
Expand Down Expand Up @@ -197,7 +197,7 @@ void CTrail::renderPass(PHLMONITOR pMonitor, const float& a) {

glStencilMask(-1);
glStencilFunc(GL_ALWAYS, 1, 0xFF);
g_pHyprOpenGL->scissor((CBox*)nullptr);
g_pHyprOpenGL->scissor(nullptr);
return;
}

Expand Down Expand Up @@ -287,7 +287,7 @@ void CTrail::renderPass(PHLMONITOR pMonitor, const float& a) {

glStencilMask(-1);
glStencilFunc(GL_ALWAYS, 1, 0xFF);
g_pHyprOpenGL->scissor((CBox*)nullptr);
g_pHyprOpenGL->scissor(nullptr);

// calculate damage
float minX = 9999999;
Expand Down Expand Up @@ -338,5 +338,5 @@ void CTrail::updateWindow(PHLWINDOW pWindow) {
void CTrail::damageEntire() {
CBox dm = {(int)(m_vLastWindowPos.x - m_seExtents.topLeft.x), (int)(m_vLastWindowPos.y - m_seExtents.topLeft.y),
(int)(m_vLastWindowSize.x + m_seExtents.topLeft.x + m_seExtents.bottomRight.x), (int)m_seExtents.topLeft.y};
g_pHyprRenderer->damageBox(&dm);
g_pHyprRenderer->damageBox(dm);
}
2 changes: 1 addition & 1 deletion hyprwinwrap/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void onNewWindow(PHLWINDOW pWindow) {
pWindow->m_vSize = PMONITOR->vecSize;
pWindow->m_vPosition = PMONITOR->vecPosition;
pWindow->m_bPinned = true;
g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize->goal(), true);
pWindow->sendWindowSize(pWindow->m_vRealSize->goal(), true);

bgWindows.push_back(pWindow);

Expand Down

0 comments on commit bf3ec04

Please sign in to comment.