mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-08 07:46:00 +01:00
override force opaque rule on keybind
This commit is contained in:
parent
e15a9f3d7d
commit
dcb6a0425c
3 changed files with 6 additions and 2 deletions
|
@ -318,6 +318,7 @@ void CWindow::applyDynamicRule(const SWindowRule& r) {
|
|||
} else if (r.szRule == "noshadow") {
|
||||
m_sAdditionalConfigData.forceNoShadow = true;
|
||||
} else if (r.szRule == "opaque") {
|
||||
if (!m_sAdditionalConfigData.forceOpaqueOverriden)
|
||||
m_sAdditionalConfigData.forceOpaque = true;
|
||||
} else if (r.szRule.find("rounding") == 0) {
|
||||
try {
|
||||
|
@ -369,6 +370,7 @@ void CWindow::updateDynamicRules() {
|
|||
m_sAdditionalConfigData.forceNoBlur = false;
|
||||
m_sAdditionalConfigData.forceNoBorder = false;
|
||||
m_sAdditionalConfigData.forceNoShadow = false;
|
||||
if (!m_sAdditionalConfigData.forceOpaqueOverriden)
|
||||
m_sAdditionalConfigData.forceOpaque = false;
|
||||
m_sAdditionalConfigData.forceNoAnims = false;
|
||||
m_sAdditionalConfigData.animationStyle = "";
|
||||
|
|
|
@ -32,6 +32,7 @@ struct SWindowAdditionalConfigData {
|
|||
int rounding = -1; // -1 means no
|
||||
bool forceNoBlur = false;
|
||||
bool forceOpaque = false;
|
||||
bool forceOpaqueOverriden = false; // if true, a rule will not change the forceOpaque state. This is for the force opaque dispatcher.
|
||||
bool forceAllowsInput = false;
|
||||
bool forceNoAnims = false;
|
||||
bool forceNoBorder = false;
|
||||
|
|
|
@ -1622,6 +1622,7 @@ void CKeybindManager::toggleOpaque(std::string unused) {
|
|||
return;
|
||||
|
||||
PWINDOW->m_sAdditionalConfigData.forceOpaque = !PWINDOW->m_sAdditionalConfigData.forceOpaque;
|
||||
PWINDOW->m_sAdditionalConfigData.forceOpaqueOverriden = true;
|
||||
|
||||
g_pHyprRenderer->damageWindow(PWINDOW);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue