mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 07:08:07 +02:00
desktop-shell: clamp view alpha correctly
Clamping of the alpha value is not done properly since the introduction of the
weston_view_set_alpha() helper.
Signed-off-by: Arnaud Vrac <avrac@freebox.fr>
(cherry picked from commit 14e0fff19a)
This commit is contained in:
parent
1f2419f0f2
commit
8772ed83df
1 changed files with 1 additions and 5 deletions
|
|
@ -3459,11 +3459,7 @@ surface_opacity_binding(struct weston_pointer *pointer,
|
|||
return;
|
||||
|
||||
shsurf->view->alpha -= event->value * step;
|
||||
|
||||
if (shsurf->view->alpha > 1.0)
|
||||
shsurf->view->alpha = 1.0;
|
||||
if (shsurf->view->alpha < step)
|
||||
shsurf->view->alpha = step;
|
||||
shsurf->view->alpha = CLIP(shsurf->view->alpha, step, 1.0);
|
||||
|
||||
weston_view_geometry_dirty(shsurf->view);
|
||||
weston_surface_damage(surface);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue