Decos: Window decoration flags, shadow improvements (#3739)
This commit is contained in:
parent
54e51b7acf
commit
73e78f05ad
17 changed files with 192 additions and 75 deletions
|
|
@ -3,7 +3,8 @@
|
|||
#include "../../defines.hpp"
|
||||
#include "../../helpers/Region.hpp"
|
||||
|
||||
enum eDecorationType {
|
||||
enum eDecorationType
|
||||
{
|
||||
DECORATION_NONE = -1,
|
||||
DECORATION_GROUPBAR,
|
||||
DECORATION_SHADOW,
|
||||
|
|
@ -15,6 +16,20 @@ struct SWindowDecorationExtents {
|
|||
Vector2D bottomRight;
|
||||
};
|
||||
|
||||
enum eDecorationLayer
|
||||
{
|
||||
DECORATION_LAYER_BOTTOM = 0, /* lowest. */
|
||||
DECORATION_LAYER_UNDER, /* under the window, but above BOTTOM */
|
||||
DECORATION_LAYER_OVER, /* above the window, but below its popups */
|
||||
DECORATION_LAYER_OVERLAY /* above everything of the window, including popups */
|
||||
};
|
||||
|
||||
enum eDecorationFlags
|
||||
{
|
||||
DECORATION_ALLOWS_MOUSE_INPUT = 1 << 0, /* this decoration accepts mouse input */
|
||||
DECORATION_PART_OF_MAIN_WINDOW = 1 << 1, /* this decoration is a *seamless* part of the main window, so stuff like shadows will include it */
|
||||
};
|
||||
|
||||
class CWindow;
|
||||
class CMonitor;
|
||||
|
||||
|
|
@ -37,14 +52,16 @@ class IHyprWindowDecoration {
|
|||
|
||||
virtual CRegion getWindowDecorationRegion();
|
||||
|
||||
virtual bool allowsInput();
|
||||
|
||||
virtual void onBeginWindowDragOnDeco(const Vector2D&); // called when the user calls the "movewindow" mouse dispatcher on the deco
|
||||
|
||||
virtual bool onEndWindowDragOnDeco(CWindow* pDraggedWindow, const Vector2D&); // returns true if the window should be placed by the layout
|
||||
|
||||
virtual void onMouseButtonOnDeco(const Vector2D&, wlr_pointer_button_event*);
|
||||
|
||||
virtual eDecorationLayer getDecorationLayer();
|
||||
|
||||
virtual uint64_t getDecorationFlags();
|
||||
|
||||
private:
|
||||
CWindow* m_pWindow = nullptr;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue