Skip to content

[Slick Window Arrangement] setting to snap to only display edges #2875

@adusamr

Description

@adusamr

First of all, thanks for windhawk and this mod. I'm really loving them.

Recently I realized that when opening many windows, snapping to other windows is a bit annoying.
It's great if it has a setting to snap to only display edges.

Edit: by display edges I meant the edges of (display - taskbar) region.

For now, I just made a modified mod where I just commented out the code:

    WindowMagnet(HWND hTargetWnd) {
        CalculateMetrics(hTargetWnd);

        // InitialWndEnumProcParam enumParam;
        // enumParam.hTargetWnd = hTargetWnd;
        // EnumWindows(InitialWndEnumProc, (LPARAM)&enumParam);

        // for (auto it = enumParam.windowRects.rbegin(); it != enumParam.windowRects.rend(); ++it) {
        //     const auto& rc = *it;

        //     RemoveOverlappedTargets(magnetTargetsLeft, rc.left, rc.right, rc.top, rc.bottom);
        //     RemoveOverlappedTargets(magnetTargetsTop, rc.top, rc.bottom, rc.left, rc.right);
        //     RemoveOverlappedTargets(magnetTargetsRight, rc.left, rc.right, rc.top, rc.bottom);
        //     RemoveOverlappedTargets(magnetTargetsBottom, rc.top, rc.bottom, rc.left, rc.right);

        //     magnetTargetsLeft.emplace(rc.left, rc.top, rc.bottom);
        //     magnetTargetsTop.emplace(rc.top, rc.left, rc.right);
        //     magnetTargetsRight.emplace(rc.right, rc.top, rc.bottom);
        //     magnetTargetsBottom.emplace(rc.bottom, rc.left, rc.right);
        // }

        EnumDisplayMonitors(nullptr, nullptr, InitialMonitorEnumProc, (LPARAM)this);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    mod-enhancementNew feature or request for a mod

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions