renderer: add "noscreenshare" layer rule (#11664)
This commit is contained in:
parent
45f007d412
commit
26f293523a
5 changed files with 27 additions and 2 deletions
|
|
@ -211,6 +211,22 @@ void CScreencopyFrame::renderMon() {
|
|||
g_pHyprOpenGL->setRenderModifEnabled(true);
|
||||
g_pHyprOpenGL->popMonitorTransformEnabled();
|
||||
|
||||
for (auto const& l : g_pCompositor->m_layers) {
|
||||
if (!l->m_noScreenShare)
|
||||
continue;
|
||||
|
||||
if UNLIKELY ((!l->m_mapped && !l->m_fadingOut) || l->m_alpha->value() == 0.f)
|
||||
continue;
|
||||
|
||||
const auto REALPOS = l->m_realPosition->value();
|
||||
const auto REALSIZE = l->m_realSize->value();
|
||||
|
||||
const auto noScreenShareBox =
|
||||
CBox{REALPOS.x, REALPOS.y, std::max(REALSIZE.x, 5.0), std::max(REALSIZE.y, 5.0)}.translate(-m_monitor->m_position).scale(m_monitor->m_scale).translate(-m_box.pos());
|
||||
|
||||
g_pHyprOpenGL->renderRect(noScreenShareBox, Colors::BLACK, {});
|
||||
}
|
||||
|
||||
for (auto const& w : g_pCompositor->m_windows) {
|
||||
if (!w->m_windowData.noScreenShare.valueOrDefault())
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue