renderer: add "noscreenshare" layer rule (#11664)
This commit is contained in:
parent
45f007d412
commit
26f293523a
5 changed files with 27 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
|||
#include <algorithm>
|
||||
#include "../debug/Log.hpp"
|
||||
|
||||
static const auto RULES = std::unordered_set<std::string>{"noanim", "blur", "blurpopups", "dimaround"};
|
||||
static const auto RULES = std::unordered_set<std::string>{"noanim", "blur", "blurpopups", "dimaround", "noscreenshare"};
|
||||
static const auto RULES_PREFIX = std::unordered_set<std::string>{"ignorealpha", "ignorezero", "xray", "animation", "order", "abovelock"};
|
||||
|
||||
CLayerRule::CLayerRule(const std::string& rule_, const std::string& ns_) : m_targetNamespace(ns_), m_rule(rule_) {
|
||||
|
|
@ -21,6 +21,8 @@ CLayerRule::CLayerRule(const std::string& rule_, const std::string& ns_) : m_tar
|
|||
m_ruleType = RULE_BLURPOPUPS;
|
||||
else if (m_rule == "dimaround")
|
||||
m_ruleType = RULE_DIMAROUND;
|
||||
else if (m_rule == "noscreenshare")
|
||||
m_ruleType = RULE_NOSCREENSHARE;
|
||||
else if (m_rule.starts_with("ignorealpha"))
|
||||
m_ruleType = RULE_IGNOREALPHA;
|
||||
else if (m_rule.starts_with("ignorezero"))
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class CLayerRule {
|
|||
RULE_ANIMATION,
|
||||
RULE_ORDER,
|
||||
RULE_ZUMBA,
|
||||
RULE_NOSCREENSHARE
|
||||
};
|
||||
|
||||
eRuleType m_ruleType = RULE_INVALID;
|
||||
|
|
|
|||
|
|
@ -388,8 +388,9 @@ void CLayerSurface::applyRules() {
|
|||
m_noAnimations = false;
|
||||
m_forceBlur = false;
|
||||
m_ignoreAlpha = false;
|
||||
m_ignoreAlphaValue = 0.f;
|
||||
m_dimAround = false;
|
||||
m_noScreenShare = false;
|
||||
m_ignoreAlphaValue = 0.f;
|
||||
m_xray = -1;
|
||||
m_animationStyle.reset();
|
||||
|
||||
|
|
@ -425,6 +426,10 @@ void CLayerSurface::applyRules() {
|
|||
m_dimAround = true;
|
||||
break;
|
||||
}
|
||||
case CLayerRule::RULE_NOSCREENSHARE: {
|
||||
m_noScreenShare = true;
|
||||
break;
|
||||
}
|
||||
case CLayerRule::RULE_XRAY: {
|
||||
CVarList vars{rule->m_rule, 0, ' '};
|
||||
m_xray = configStringToInt(vars[1]).value_or(false);
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ class CLayerSurface {
|
|||
bool m_ignoreAlpha = false;
|
||||
float m_ignoreAlphaValue = 0.f;
|
||||
bool m_dimAround = false;
|
||||
bool m_noScreenShare = false;
|
||||
int64_t m_order = 0;
|
||||
bool m_aboveLockscreen = false;
|
||||
bool m_aboveLockscreenInteractable = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue