Group/Tab Rework (#1580)

This commit is contained in:
Vaxry
2023-02-19 21:07:32 +00:00
committed by GitHub
parent 2363cc2572
commit e5a4c0c986
12 changed files with 268 additions and 495 deletions

View File

@@ -273,6 +273,12 @@ class CWindow {
// for idle inhibiting windows
eIdleInhibitMode m_eIdleInhibitMode = IDLEINHIBIT_NONE;
// for groups
struct SGroupData {
CWindow* pNextWindow = nullptr; // nullptr means no grouping. Self means single group.
bool head = false;
} m_sGroupData;
// For the list lookup
bool operator==(const CWindow& rhs) {
return m_uSurface.xdg == rhs.m_uSurface.xdg && m_uSurface.xwayland == rhs.m_uSurface.xwayland && m_vPosition == rhs.m_vPosition && m_vSize == rhs.m_vSize &&
@@ -303,6 +309,12 @@ class CWindow {
bool isInCurvedCorner(double x, double y);
bool hasPopupAt(const Vector2D& pos);
CWindow* getGroupHead();
CWindow* getGroupTail();
CWindow* getGroupCurrent();
void setGroupCurrent(CWindow* pWindow);
void insertWindowToGroup(CWindow* pWindow);
private:
// For hidden windows and stuff
bool m_bHidden = false;