Skip to content

fix(dwindle): ignore fullscreen window for positioning when use_active_for_splits=false #9838

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

Merged
merged 2 commits into from
Apr 12, 2025

Conversation

rszyma
Copy link
Contributor

@rszyma rszyma commented Apr 3, 2025

Describe your PR, what does it fix/add?

Repro Steps:

  1. Use dwindle + use_active_for_splits=0
  2. have 3 windows open next to each other (layed out horizontally and spaced evenly)
  3. maximize the leftmost one
  4. move mouse pointer near the right edge of the screen
  5. open a new window (e.g. a terminal)

Actual:

The new window opens next to leftmost window.

Expected:

The new window opens next to the rightmost window - nearby where the mouse cursor is. That's what use_active_for_splits=0 should do (from wiki: "prefer mouse position for splits")

Note, that this behavor is exactly what would happen if you inserted an extra step of minimizing the fullscreen window between the steps 4 and 5. And this PR attempts to do exacly this, trying to ignore the current fullscreen window when creating a new one.

Before vs after videos

In the following videos I have also set smart_split=1, which makes the issue more pronounced. Btw on videos I'm not doing the exact steps above, sowwy about that (they are old vids), but it should be clear enough I hope.

Before:

Details
before.mp4

After:

Details
after.mp4

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

It actually used to work like this before a year ago or so, and it's been annoying me for a long time. I've had enough.

Is it ready for merging, or does it need work?

should be ready to go, unless we want to make this configurable.

@rszyma rszyma marked this pull request as draft April 3, 2025 01:32
@rszyma rszyma force-pushed the fix-dwindle-fullscreen-split branch from 8b102e5 to f534b85 Compare April 3, 2025 01:34
@github-actions github-actions bot added the layout label Apr 3, 2025
@rszyma rszyma marked this pull request as ready for review April 3, 2025 01:58
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@vaxerski vaxerski merged commit 4d85e79 into hyprwm:main Apr 12, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants