Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a floating group is focused, add new windows to it #7840

Open
Aqa-Ib opened this issue Sep 18, 2024 · 3 comments
Open

When a floating group is focused, add new windows to it #7840

Aqa-Ib opened this issue Sep 18, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Aqa-Ib
Copy link
Contributor

Aqa-Ib commented Sep 18, 2024

Description

I wish that when a floating grouped window is focused, new windows would be added to the group instead of creating a new standalone window. This behavior is present on tiling grouped windows already.

This would be a huge improvement to the floating grouped windows workflow. Also adds consistency with the tiling worflow.

Cheers!

@Aqa-Ib Aqa-Ib added the enhancement New feature or request label Sep 18, 2024
@Aqa-Ib
Copy link
Contributor Author

Aqa-Ib commented Sep 19, 2024

void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {

  if (pWindow->m_sGroupData.pNextWindow.lock()) {  
        static auto USECURRPOS = CConfigValue<Hyprlang::INT>("group:insert_after_current");
        (*USECURRPOS ? pWindow.lock() : pWindow->getGroupTail())->insertWindowToGroup(pWindow);

        pWindow->setGroupCurrent(pWindow);
        pWindow->applyGroupRules();
        pWindow->updateWindowDecos();
        recalculateWindow(pWindow);

        if (!pWindow->getDecorationByType(DECORATION_GROUPBAR))
            pWindow->addWindowDeco(std::make_unique<CHyprGroupBarDecoration>(pWindow));

        return;

  }

...

}

I am tripping, just guessing the code. Help would be appreciated.

@vaxerski
Copy link
Member

see dwindle@344

@Aqa-Ib
Copy link
Contributor Author

Aqa-Ib commented Sep 20, 2024

To understand how to hack it, I have made this change on MasterLayout.cpp@108:
auto OPENINGON = getNodeFromWindow(g_pCompositor->m_pLastWindow.lock());
Still it does not open the new windows in the floating group. Why? edit: OK, so I have understood that I can't getNodeFromWindow if it is floating. Let me cook :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants