mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 23:51:55 -07:00
layout: add direction parameter to onWindowCreated and friends (#3269)
* feat(layout): add direction parameter to onWindowCreated and friends In addition: - Implement directional moveWindowOutOfGroup for `movewindoworgroup` when using dwindle layout. (augmentation of #3006) - Replace `DWindleLayout::OneTimeFocus` with `IHyprLayout::eDirection`. - Slight formatting change (clang-format). * fix: nullptr dereference in dwindle window creation * refactor: generalized eDirection * refactor: eliminate DIRECTION_NONE * Update IHyprLayout.hpp
This commit is contained in:
@@ -10,15 +10,6 @@
|
||||
class CHyprDwindleLayout;
|
||||
enum eFullscreenMode : uint8_t;
|
||||
|
||||
enum OneTimeFocus
|
||||
{
|
||||
UP = 0,
|
||||
RIGHT,
|
||||
DOWN,
|
||||
LEFT,
|
||||
NOFOCUS,
|
||||
};
|
||||
|
||||
struct SDwindleNodeData {
|
||||
SDwindleNodeData* pParent = nullptr;
|
||||
bool isNode = false;
|
||||
@@ -51,7 +42,7 @@ struct SDwindleNodeData {
|
||||
|
||||
class CHyprDwindleLayout : public IHyprLayout {
|
||||
public:
|
||||
virtual void onWindowCreatedTiling(CWindow*);
|
||||
virtual void onWindowCreatedTiling(CWindow*, eDirection direction = DIRECTION_DEFAULT);
|
||||
virtual void onWindowRemovedTiling(CWindow*);
|
||||
virtual bool isWindowTiled(CWindow*);
|
||||
virtual void recalculateMonitor(const int&);
|
||||
@@ -90,7 +81,7 @@ class CHyprDwindleLayout : public IHyprLayout {
|
||||
|
||||
void toggleSplit(CWindow*);
|
||||
|
||||
OneTimeFocus overrideDirection = OneTimeFocus::NOFOCUS;
|
||||
eDirection overrideDirection = DIRECTION_DEFAULT;
|
||||
|
||||
friend struct SDwindleNodeData;
|
||||
};
|
||||
|
Reference in New Issue
Block a user