uint32_t key, uint32_t button, uint32_t axis,
int32_t value, void *data)
{
- uint32_t step = 15;
+ float step = 0.05;
struct shell_surface *shsurf;
struct weston_surface *surface =
(struct weston_surface *) seat->pointer->focus;
surface->alpha += value * step;
- if (surface->alpha > 255)
- surface->alpha = 255;
+ if (surface->alpha > 1.0)
+ surface->alpha = 1.0;
if (surface->alpha < step)
surface->alpha = step;
if (prev == switcher->current)
next = surface;
prev = surface;
- surface->alpha = 64;
+ surface->alpha = 0.25;
surface->geometry.dirty = 1;
weston_surface_damage(surface);
break;
}
if (is_black_surface(surface, NULL)) {
- surface->alpha = 64;
+ surface->alpha = 0.25;
surface->geometry.dirty = 1;
weston_surface_damage(surface);
}