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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/layout/DwindleLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Copy link
Member

Choose a reason for hiding this comment

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

you do see bugs you just dont notice them cuz they arent as visible

return g_pCompositor->m_pLastMonitor->vecSize;
else {
const auto PNODE = getNodeFromWindow(candidate);
Expand Down
Loading