summaryrefslogtreecommitdiff
path: root/src/Window.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.hpp')
-rw-r--r--src/Window.hpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Window.hpp b/src/Window.hpp
index 7e4c73b8..81b6156f 100644
--- a/src/Window.hpp
+++ b/src/Window.hpp
@@ -18,6 +18,18 @@ enum eIdleInhibitMode {
IDLEINHIBIT_FOCUS
};
+enum eGroupRules {
+ // effective only during first map, except for _ALWAYS variant
+ GROUP_NONE = 0,
+ GROUP_SET = 1 << 0, // Open as new group or add to focused group
+ GROUP_SET_ALWAYS = 1 << 1,
+ GROUP_BARRED = 1 << 2, // Don't insert to focused group.
+ GROUP_LOCK = 1 << 3, // Lock m_sGroupData.lock
+ GROUP_LOCK_ALWAYS = 1 << 4,
+ GROUP_INVADE = 1 << 5, // Force enter a group, event if lock is engaged
+ GROUP_OVERRIDE = 1 << 6, // Override other rules
+};
+
template <typename T>
class CWindowOverridableVar {
public:
@@ -300,8 +312,10 @@ class CWindow {
struct SGroupData {
CWindow* pNextWindow = nullptr; // nullptr means no grouping. Self means single group.
bool head = false;
- bool locked = false;
+ bool locked = false; // per group lock
+ bool deny = false; // deny window from enter a group or made a group
} m_sGroupData;
+ uint16_t m_eGroupRules = GROUP_NONE;
// For the list lookup
bool operator==(const CWindow& rhs) {
@@ -342,6 +356,9 @@ class CWindow {
bool isInCurvedCorner(double x, double y);
bool hasPopupAt(const Vector2D& pos);
+ void applyGroupRules();
+ void createGroup();
+ void destroyGroup();
CWindow* getGroupHead();
CWindow* getGroupTail();
CWindow* getGroupCurrent();