mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-01 20:51:58 -07:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
eab2799842 | ||
|
6eb2abcb20 | ||
|
ae46fbafe5 | ||
|
52cf122a0a | ||
|
844da8db56 |
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "0.32.1"
|
"version": "0.32.2"
|
||||||
}
|
}
|
@@ -184,8 +184,11 @@ void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, Vector2D size, bool f
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CHyprXWaylandManager::setWindowStyleTiled(CWindow* pWindow, uint32_t edgez) {
|
void CHyprXWaylandManager::setWindowStyleTiled(CWindow* pWindow, uint32_t edgez) {
|
||||||
if (!pWindow->m_bIsX11)
|
if (pWindow->m_bIsX11)
|
||||||
wlr_xdg_toplevel_set_tiled(pWindow->m_uSurface.xdg->toplevel, edgez);
|
return;
|
||||||
|
|
||||||
|
wlr_xdg_toplevel_set_tiled(pWindow->m_uSurface.xdg->toplevel, edgez);
|
||||||
|
wlr_xdg_toplevel_set_maximized(pWindow->m_uSurface.xdg->toplevel, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_surface* CHyprXWaylandManager::surfaceAt(CWindow* pWindow, const Vector2D& client, Vector2D& surface) {
|
wlr_surface* CHyprXWaylandManager::surfaceAt(CWindow* pWindow, const Vector2D& client, Vector2D& surface) {
|
||||||
|
@@ -38,13 +38,8 @@ void CHyprDropShadowDecoration::damageEntire() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CHyprDropShadowDecoration::updateWindow(CWindow* pWindow) {
|
void CHyprDropShadowDecoration::updateWindow(CWindow* pWindow) {
|
||||||
|
m_vLastWindowPos = m_pWindow->m_vRealPosition.vec();
|
||||||
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(pWindow->m_iWorkspaceID);
|
m_vLastWindowSize = m_pWindow->m_vRealSize.vec();
|
||||||
|
|
||||||
const auto WORKSPACEOFFSET = PWORKSPACE && !pWindow->m_bPinned ? PWORKSPACE->m_vRenderOffset.vec() : Vector2D();
|
|
||||||
|
|
||||||
m_vLastWindowPos = pWindow->m_vRealPosition.vec() + WORKSPACEOFFSET;
|
|
||||||
m_vLastWindowSize = pWindow->m_vRealSize.vec();
|
|
||||||
|
|
||||||
m_bLastWindowBox = {m_vLastWindowPos.x, m_vLastWindowPos.y, m_vLastWindowSize.x, m_vLastWindowSize.y};
|
m_bLastWindowBox = {m_vLastWindowPos.x, m_vLastWindowPos.y, m_vLastWindowSize.x, m_vLastWindowSize.y};
|
||||||
m_bLastWindowBoxWithDecos = g_pDecorationPositioner->getBoxWithIncludedDecos(pWindow);
|
m_bLastWindowBoxWithDecos = g_pDecorationPositioner->getBoxWithIncludedDecos(pWindow);
|
||||||
@@ -76,11 +71,13 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
|
|||||||
if (*PSHADOWS != 1)
|
if (*PSHADOWS != 1)
|
||||||
return; // disabled
|
return; // disabled
|
||||||
|
|
||||||
const auto ROUNDING = m_pWindow->rounding() + m_pWindow->getRealBorderSize();
|
const auto ROUNDING = m_pWindow->rounding() + m_pWindow->getRealBorderSize();
|
||||||
|
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_pWindow->m_iWorkspaceID);
|
||||||
|
const auto WORKSPACEOFFSET = PWORKSPACE && !m_pWindow->m_bPinned ? PWORKSPACE->m_vRenderOffset.vec() : Vector2D();
|
||||||
|
|
||||||
// draw the shadow
|
// draw the shadow
|
||||||
CBox fullBox = m_bLastWindowBoxWithDecos;
|
CBox fullBox = m_bLastWindowBoxWithDecos;
|
||||||
fullBox.translate(-pMonitor->vecPosition);
|
fullBox.translate(-pMonitor->vecPosition + WORKSPACEOFFSET);
|
||||||
fullBox.x -= *PSHADOWSIZE;
|
fullBox.x -= *PSHADOWSIZE;
|
||||||
fullBox.y -= *PSHADOWSIZE;
|
fullBox.y -= *PSHADOWSIZE;
|
||||||
fullBox.w += 2 * *PSHADOWSIZE;
|
fullBox.w += 2 * *PSHADOWSIZE;
|
||||||
@@ -114,8 +111,8 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
|
|||||||
CBox withDecos = m_bLastWindowBoxWithDecos;
|
CBox withDecos = m_bLastWindowBoxWithDecos;
|
||||||
|
|
||||||
// get window box
|
// get window box
|
||||||
windowBox.translate(-pMonitor->vecPosition).scale(pMonitor->scale).round();
|
windowBox.translate(-pMonitor->vecPosition + WORKSPACEOFFSET).scale(pMonitor->scale).round();
|
||||||
withDecos.translate(-pMonitor->vecPosition).scale(pMonitor->scale).round();
|
withDecos.translate(-pMonitor->vecPosition + WORKSPACEOFFSET).scale(pMonitor->scale).round();
|
||||||
|
|
||||||
auto scaledDecoExtents = withDecos.extentsFrom(windowBox).round();
|
auto scaledDecoExtents = withDecos.extentsFrom(windowBox).round();
|
||||||
|
|
||||||
|
@@ -238,14 +238,13 @@ vec3 rgb2hsl(vec3 col) {
|
|||||||
|
|
||||||
vec3 adds = vec3(((green - blue) / delta), 2.0 + ((blue - red) / delta), 4.0 + ((red - green) / delta));
|
vec3 adds = vec3(((green - blue) / delta), 2.0 + ((blue - red) / delta), 4.0 + ((red - green) / delta));
|
||||||
|
|
||||||
float deltaGtz = (delta > 0.0) ? 1.0 : 0.0;
|
if (delta > 0.0) {
|
||||||
|
hue += dot(adds, masks);
|
||||||
|
hue /= 6.0;
|
||||||
|
|
||||||
hue += dot(adds, masks);
|
if (hue < 0.0)
|
||||||
hue *= deltaGtz;
|
hue += 1.0;
|
||||||
hue /= 6.0;
|
}
|
||||||
|
|
||||||
if (hue < 0.0)
|
|
||||||
hue += 1.0;
|
|
||||||
|
|
||||||
return vec3(hue, sat, lum);
|
return vec3(hue, sat, lum);
|
||||||
}
|
}
|
||||||
@@ -258,19 +257,18 @@ vec3 hsl2rgb(vec3 col) {
|
|||||||
float sat = col.y;
|
float sat = col.y;
|
||||||
float lum = col.z;
|
float lum = col.z;
|
||||||
|
|
||||||
vec3 xt = vec3(rcpsixth * (hue - twothird), 0.0, rcpsixth * (1.0 - hue));
|
vec3 xt = vec3(0.0);
|
||||||
|
|
||||||
if (hue < twothird) {
|
|
||||||
xt.r = 0.0;
|
|
||||||
xt.g = rcpsixth * (twothird - hue);
|
|
||||||
xt.b = rcpsixth * (hue - onethird);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hue < onethird) {
|
if (hue < onethird) {
|
||||||
xt.r = rcpsixth * (onethird - hue);
|
xt.r = rcpsixth * (onethird - hue);
|
||||||
xt.g = rcpsixth * hue;
|
xt.g = rcpsixth * hue;
|
||||||
xt.b = 0.0;
|
xt.b = 0.0;
|
||||||
}
|
} else if (hue < twothird) {
|
||||||
|
xt.r = 0.0;
|
||||||
|
xt.g = rcpsixth * (twothird - hue);
|
||||||
|
xt.b = rcpsixth * (hue - onethird);
|
||||||
|
} else
|
||||||
|
xt = vec3(rcpsixth * (hue - twothird), 0.0, rcpsixth * (1.0 - hue));
|
||||||
|
|
||||||
xt = min(xt, 1.0);
|
xt = min(xt, 1.0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user