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

Fix size prediction when the focused window and cursor are on different monitors #9116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kam1k4dze
Copy link
Contributor

Describe your PR, what does it fix/add?

Fixes #9057

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

No

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

Ready

@@ -1084,7 +1084,7 @@ Vector2D CHyprDwindleLayout::predictSizeForNewWindowTiled() {
// create a fake node
SDwindleNodeData node;

if (!candidate)
if (!candidate || candidate->monitorID() != g_pCompositor->m_pLastMonitor->ID)
Copy link
Member

Choose a reason for hiding this comment

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

this will always predict the full monitor even if it is populated. That's not the way to do it, we probably should find a candidate on the other monitor and go from that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right and this is the right way, but even when it predicts bigger than needed, I don't see any artifacts or bugs. Maybe I'm not seeing something because logically you should expect something to go wrong if the predicted size is wrong.

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.

Wrong initial window size on unfocused monitor
2 participants