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

window: fix negative offset clip #137

Merged
merged 1 commit into from
Dec 18, 2024
Merged

window: fix negative offset clip #137

merged 1 commit into from
Dec 18, 2024

Conversation

rockorager
Copy link
Owner

@rockorager rockorager commented Dec 18, 2024

Accumulate any negative offsets in order to properly clip windows to
their parents. Previously, we only clipped if the window would be off
the screen from a negative offset. In the diagram below, we should
expect that if B is a child of A, it can't print in the non-overlapping
area. That is, B can only print in the overlapping region with A because
it is a child of A. This patch fixes this.

+-----------------------------------------------------+
|                                                     |
|              +--------+                             |
|              | B      |                             |
|              |    +---|-----+                       |
|              |    |   |     |                       |
|              +--------+     |                       |
|                   |         |                       |
|                   |      A  |                       |
|                   +---------+                       |
|                                                     |
|                                                     |
|                                                     |
+-----------------------------------------------------+

Accumulate any negative offsets in order to properly clip windows to
their parents. Previously, we only clipped if the window would be off
the screen from a negative offset. In the diagram below, we should
expect that if B is a child of A, it can't print in the non-overlapping
area. That is, B can only print in the overlapping region with A because
it is a child of A. This patch fixes this.

+-----------------------------------------------------+
|                                                     |
|              +--------+                             |
|              | B      |                             |
|              |    +---|-----+                       |
|              |    |   |     |                       |
|              +--------+     |                       |
|                   |         |                       |
|                   |      A  |                       |
|                   +---------+                       |
|                                                     |
|                                                     |
|                                                     |
+-----------------------------------------------------+
@rockorager rockorager merged commit 9d8dd75 into main Dec 18, 2024
4 checks passed
@rockorager rockorager deleted the fix-window-clip branch December 18, 2024 16:19
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.

1 participant