hyprctl: add decorations (#4275)
* add hyprctl decorations modified: hyprctl/main.cpp modified: src/debug/HyprCtl.cpp modified: src/render/decorations/CHyprBorderDecoration.cpp modified: src/render/decorations/CHyprBorderDecoration.hpp modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprDropShadowDecoration.hpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.hpp modified: src/render/decorations/IHyprWindowDecoration.cpp modified: src/render/decorations/IHyprWindowDecoration.hpp * fixes modified: hyprctl/main.cpp modified: src/render/decorations/IHyprWindowDecoration.cpp
This commit is contained in:
parent
6a93cee74e
commit
5f65946c84
10 changed files with 59 additions and 4 deletions
|
|
@ -99,6 +99,10 @@ uint64_t CHyprBorderDecoration::getDecorationFlags() {
|
|||
return *PPARTOFWINDOW && !doesntWantBorders() ? DECORATION_PART_OF_MAIN_WINDOW : 0;
|
||||
}
|
||||
|
||||
std::string CHyprBorderDecoration::getDisplayName() {
|
||||
return "Border";
|
||||
}
|
||||
|
||||
bool CHyprBorderDecoration::doesntWantBorders() {
|
||||
return !m_pWindow->m_sSpecialRenderData.border || m_pWindow->m_bX11DoesntWantBorders;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class CHyprBorderDecoration : public IHyprWindowDecoration {
|
|||
|
||||
virtual uint64_t getDecorationFlags();
|
||||
|
||||
virtual std::string getDisplayName();
|
||||
|
||||
private:
|
||||
SWindowDecorationExtents m_seExtents;
|
||||
SWindowDecorationExtents m_seReportedExtents;
|
||||
|
|
@ -36,4 +38,4 @@ class CHyprBorderDecoration : public IHyprWindowDecoration {
|
|||
|
||||
CBox assignedBoxGlobal();
|
||||
bool doesntWantBorders();
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ uint64_t CHyprDropShadowDecoration::getDecorationFlags() {
|
|||
return DECORATION_NON_SOLID;
|
||||
}
|
||||
|
||||
std::string CHyprDropShadowDecoration::getDisplayName() {
|
||||
return "Drop Shadow";
|
||||
}
|
||||
|
||||
void CHyprDropShadowDecoration::damageEntire() {
|
||||
static auto* const PSHADOWS = &g_pConfigManager->getConfigValuePtr("decoration:drop_shadow")->intValue;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class CHyprDropShadowDecoration : public IHyprWindowDecoration {
|
|||
|
||||
virtual uint64_t getDecorationFlags();
|
||||
|
||||
virtual std::string getDisplayName();
|
||||
|
||||
private:
|
||||
SWindowDecorationExtents m_seExtents;
|
||||
SWindowDecorationExtents m_seReportedExtents;
|
||||
|
|
@ -34,4 +36,4 @@ class CHyprDropShadowDecoration : public IHyprWindowDecoration {
|
|||
|
||||
CBox m_bLastWindowBox = {0};
|
||||
CBox m_bLastWindowBoxWithDecos = {0};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -414,6 +414,10 @@ uint64_t CHyprGroupBarDecoration::getDecorationFlags() {
|
|||
return DECORATION_ALLOWS_MOUSE_INPUT;
|
||||
}
|
||||
|
||||
std::string CHyprGroupBarDecoration::getDisplayName() {
|
||||
return "GroupBar";
|
||||
}
|
||||
|
||||
CBox CHyprGroupBarDecoration::assignedBoxGlobal() {
|
||||
CBox box = m_bAssignedBox;
|
||||
box.translate(g_pDecorationPositioner->getEdgeDefinedPoint(DECORATION_EDGE_TOP, m_pWindow));
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ class CHyprGroupBarDecoration : public IHyprWindowDecoration {
|
|||
|
||||
virtual uint64_t getDecorationFlags();
|
||||
|
||||
virtual std::string getDisplayName();
|
||||
|
||||
private:
|
||||
SWindowDecorationExtents m_seExtents;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,4 +26,8 @@ eDecorationLayer IHyprWindowDecoration::getDecorationLayer() {
|
|||
|
||||
uint64_t IHyprWindowDecoration::getDecorationFlags() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
std::string IHyprWindowDecoration::getDisplayName() {
|
||||
return "Unknown Decoration";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ class IHyprWindowDecoration {
|
|||
|
||||
virtual uint64_t getDecorationFlags();
|
||||
|
||||
virtual std::string getDisplayName();
|
||||
|
||||
private:
|
||||
CWindow* m_pWindow = nullptr;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue