Skip to content

Commit 8fffe6a

Browse files
authored
fix(desktop): remove oversized bars from Hyprland SnapShot animations (pingdotgg#10646)
1 parent 073734c commit 8fffe6a

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎native/hyprland-snap-shot/src/feedback.rs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -464,22 +464,22 @@ impl Feedback {
464464
overlay
465465
.subsurface
466466
.set_position(dest.x.round() as i32, dest.y.round() as i32);
467-
// Immutable textures are uploaded only when they change. Flight frames update
468-
// the viewport and subsurface position, not megabytes of shared-memory pixels.
467+
// Hyprland 0.56.2 retains the old surface size on viewport-only commits.
468+
// Reattach the immutable buffer so the destination size is applied too.
469469
let texture = if flashing {
470470
Texture::Flash
471471
} else {
472472
Texture::Image
473473
};
474+
overlay.image.attach(
475+
Some((if flashing { &self.flash } else { &self.image }).wl_buffer()),
476+
0,
477+
0,
478+
);
474479
if overlay.texture != texture {
475-
overlay.image.attach(
476-
Some((if flashing { &self.flash } else { &self.image }).wl_buffer()),
477-
0,
478-
0,
479-
);
480480
overlay.image.damage_buffer(0, 0, i32::MAX, i32::MAX);
481-
overlay.texture = texture;
482481
}
482+
overlay.texture = texture;
483483
} else {
484484
if overlay.texture != Texture::None {
485485
overlay.image.attach(None, 0, 0);

0 commit comments

Comments
 (0)