summaryrefslogtreecommitdiff
path: root/src/layout/DwindleLayout.hpp
diff options
context:
space:
mode:
authormemchr <118117622+memchr@users.noreply.github.com>2023-09-13 10:13:29 +0000
committerGitHub <noreply@github.com>2023-09-13 11:13:29 +0100
commit6b1ac659e005042a6970ffc489aef71e0875af15 (patch)
treece0e73429f76dcd884d27cafdadfda51b925b57f /src/layout/DwindleLayout.hpp
parentb0d5e4008b96f2cdbb6f6c2449c790d921d1546b (diff)
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
Diffstat (limited to 'src/layout/DwindleLayout.hpp')
-rw-r--r--src/layout/DwindleLayout.hpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/layout/DwindleLayout.hpp b/src/layout/DwindleLayout.hpp
index a901e4da..66c117fc 100644
--- a/src/layout/DwindleLayout.hpp
+++ b/src/layout/DwindleLayout.hpp
@@ -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;
};