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 floating clipbox scale #3907

Merged
merged 3 commits into from
Nov 21, 2023
Merged

Conversation

thejch
Copy link
Contributor

@thejch thejch commented Nov 20, 2023

Describe your PR, what does it fix/add?

Fix floating clipbox scale. Should fix the window getting clipped incorrectly during workspace transition? Not 100% sure but works for me

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

@thejch thejch changed the title Fix floating decoration clipbox scale Fix floating clipbox scale Nov 20, 2023
@vaxerski
Copy link
Member

you can use vecTransformedSize instead. It's the same.

@thejch
Copy link
Contributor Author

thejch commented Nov 20, 2023

you can use vecTransformedSize instead. It's the same.

added

vaxerski
vaxerski previously approved these changes Nov 20, 2023
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.

I told you long ago, on the road

@vaxerski
Copy link
Member

wait, this needs to be rethinked.

@vaxerski
Copy link
Member

vaxerski commented Nov 20, 2023

why are we adding the entire monitor here?

We should just translate it by the workspace offset

oops

you wanna do it or should I?

@thejch
Copy link
Contributor Author

thejch commented Nov 20, 2023

you can do it if you want. as long as the scale thing gets fixed lol

@vaxerski
Copy link
Member

I can't repro so I can just suggest you try this:

CRegion rg = pWindow->getFullWindowBoundingBox().translate(-pMonitor->vecPosition).scale(pMonitor->scale);
rg.add(CBox{0, 0, pMonitor->vecSize.x, pMonitor->vecSize.y});

into

CRegion rg = pWindow->getFullWindowBoundingBox().translate(-pMonitor->vecPosition + PWORKSPACE->m_vRenderOffset.vec()).scale(pMonitor->scale);

@thejch
Copy link
Contributor Author

thejch commented Nov 21, 2023

yea seems to do it. I added that

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.

top g thanks!

@vaxerski vaxerski merged commit 572fd55 into hyprwm:main Nov 21, 2023
@thejch thejch deleted the float-clip-deco-scale branch November 26, 2023 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants