1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2025-10-30 23:46:46 -04:00

renderer/command_builder: fix misaligned shadow and window

See the comment.

Related: #1389 (partial fix)

Changelog: BugFix: Fix misaligned shadow and window when they are scaled.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2025-08-22 23:27:40 +01:00
parent c1b8fea1b6
commit 8bc48df063
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4
2 changed files with 14 additions and 2 deletions

View file

@ -173,6 +173,13 @@ static inline vec2 vec2_scale(vec2 a, vec2 scale) {
};
}
static inline vec2 vec2_reciprocal(vec2 a) {
return (vec2){
.x = 1.0 / a.x,
.y = 1.0 / a.y,
};
}
/// Check if two boxes have a non-zero intersection area.
static inline bool ibox_overlap(struct ibox a, struct ibox b) {
if (a.size.width <= 0 || a.size.height <= 0 || b.size.width <= 0 || b.size.height <= 0) {