T1C: window dance compat

This commit is contained in:
vaxerski 2022-10-20 22:38:49 +01:00
parent 6df6aea1ba
commit ce5f025428
3 changed files with 6 additions and 1 deletions

View file

@ -26,6 +26,7 @@ struct SWindowAdditionalConfigData {
bool forceNoAnims = false;
bool forceNoBorder = false;
bool forceNoShadow = false;
bool windowDanceCompat = false;
};
class CWindow {

View file

@ -761,6 +761,7 @@ bool windowRuleValid(const std::string& RULE) {
&& RULE != "fullscreen"
&& RULE != "pin"
&& RULE != "noanim"
&& RULE != "windowdance"
&& RULE.find("animation") != 0
&& RULE.find("rounding") != 0
&& RULE.find("workspace") != 0);

View file

@ -169,6 +169,8 @@ void Events::listener_mapWindow(void* owner, void* data) {
requestsFullscreen = true;
} else if (r.szRule == "opaque") {
PWINDOW->m_sAdditionalConfigData.forceOpaque = true;
} else if (r.szRule == "windowdance") {
PWINDOW->m_sAdditionalConfigData.windowDanceCompat = true;
} else if (r.szRule == "forceinput") {
PWINDOW->m_sAdditionalConfigData.forceAllowsInput = true;
} else if (r.szRule == "pin") {
@ -737,6 +739,7 @@ void Events::listener_configureX11(void* owner, void* data) {
PWINDOW->m_bCreatedOverFullscreen = true;
if (!PWINDOW->m_sAdditionalConfigData.windowDanceCompat)
g_pInputManager->refocus();
g_pHyprRenderer->damageWindow(PWINDOW);