mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-06 05:18:00 +02:00
algo/dwindle: do NOT use smart_split for overridden focal point (#13635)
ref #13594
This commit is contained in:
parent
e172a26b5b
commit
e32eeb1d45
2 changed files with 6 additions and 6 deletions
|
|
@ -64,16 +64,16 @@ static void test13349() {
|
|||
|
||||
{
|
||||
auto str = getFromSocket("/activewindow");
|
||||
EXPECT_CONTAINS(str, "at: 497,22");
|
||||
EXPECT_CONTAINS(str, "size: 456,1036");
|
||||
EXPECT_CONTAINS(str, "at: 22,547");
|
||||
EXPECT_CONTAINS(str, "size: 931,511");
|
||||
}
|
||||
|
||||
OK(getFromSocket("/dispatch movewindow r"));
|
||||
|
||||
{
|
||||
auto str = getFromSocket("/activewindow");
|
||||
EXPECT_CONTAINS(str, "at: 967,22");
|
||||
EXPECT_CONTAINS(str, "size: 456,1036");
|
||||
EXPECT_CONTAINS(str, "at: 967,547");
|
||||
EXPECT_CONTAINS(str, "size: 931,511");
|
||||
}
|
||||
|
||||
// clean up
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ void CDwindleAlgorithm::addTarget(SP<ITarget> target, bool newTarget) {
|
|||
// whether or not the override persists after opening one window
|
||||
if (*PERMANENTDIRECTIONOVERRIDE == 0)
|
||||
m_overrideDirection = Math::DIRECTION_DEFAULT;
|
||||
} else if (*PSMARTSPLIT == 1 || m_overrideFocalPoint) {
|
||||
} else if (*PSMARTSPLIT == 1) {
|
||||
const auto PARENT_CENTER = NEWPARENT->box.pos() + NEWPARENT->box.size() / 2;
|
||||
const auto PARENT_PROPORTIONS = NEWPARENT->box.h / NEWPARENT->box.w;
|
||||
const auto DELTA = MOUSECOORDS - PARENT_CENTER;
|
||||
|
|
@ -215,7 +215,7 @@ void CDwindleAlgorithm::addTarget(SP<ITarget> target, bool newTarget) {
|
|||
NEWPARENT->children[1] = OPENINGON;
|
||||
}
|
||||
}
|
||||
} else if (*PFORCESPLIT == 0 || !newTarget) {
|
||||
} else if (*PFORCESPLIT == 0 || !newTarget || m_overrideFocalPoint) {
|
||||
if ((SIDEBYSIDE && MOUSECOORDS.x < NEWPARENT->box.x + (NEWPARENT->box.w / 2.F)) || (!SIDEBYSIDE && MOUSECOORDS.y < NEWPARENT->box.y + (NEWPARENT->box.h / 2.F))) {
|
||||
// we are hovering over the first node, make PNODE first.
|
||||
NEWPARENT->children[1] = OPENINGON;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue