apply some rules dynamically when state of window changes (#1020)

Co-authored-by: Jef Steelant <jef.steelant_ext@softathome.com>
This commit is contained in:
Jef
2022-11-15 11:21:26 +01:00
committed by GitHub
parent 4034aa2c60
commit dbb6732743
7 changed files with 130 additions and 60 deletions

View File

@@ -39,6 +39,19 @@ struct SWindowAdditionalConfigData {
bool windowDanceCompat = false;
};
struct SWindowRule {
std::string szRule;
std::string szValue;
bool v2 = false;
std::string szTitle;
std::string szClass;
int bX11 = -1; // -1 means "ANY"
int bFloating = -1;
int bFullscreen = -1;
int bPinned = -1;
};
class CWindow {
public:
CWindow();
@@ -189,6 +202,8 @@ public:
void onMap();
void setHidden(bool hidden);
bool isHidden();
void applyDynamicRule(const SWindowRule& r);
void updateDynamicRules();
private:
// For hidden windows and stuff