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:
memchr
2023-09-13 10:13:29 +00:00
committed by GitHub
parent b0d5e4008b
commit 6b1ac659e0
8 changed files with 69 additions and 59 deletions

View File

@@ -2,7 +2,7 @@
#include "../defines.hpp"
#include "../Compositor.hpp"
void IHyprLayout::onWindowCreated(CWindow* pWindow) {
void IHyprLayout::onWindowCreated(CWindow* pWindow, eDirection direction) {
if (pWindow->m_bIsFloating) {
onWindowCreatedFloating(pWindow);
} else {
@@ -18,7 +18,7 @@ void IHyprLayout::onWindowCreated(CWindow* pWindow) {
pWindow->m_vPseudoSize = pWindow->m_vLastFloatingSize;
onWindowCreatedTiling(pWindow);
onWindowCreatedTiling(pWindow, direction);
}
}