# gpui: Avoid redundant group hover redraws \(\#61118\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ae3bbdeb2df000acd8e0c5c75275cbb357e2b223)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ae3bbdeb2df000acd8e0c5c75275cbb357e2b223

Requested commit: ae3bbdeb2df000acd8e0c5c75275cbb357e2b223

Commit: ae3bbdeb2df000acd8e0c5c75275cbb357e2b223

Tree: 91ea855cd3ddbb1a8ed230e903c31880bd0f84bf

Author: Daan De Meyer

Committer: GitHub

## Message

```
gpui: Avoid redundant group hover redraws (#61118)

Anonymous elements with group hover styles have no persistent hover
state. The
prepaint mouse handler treated missing state as unhovered and notified
the
current view for every pointer movement within the group. This made
controls
such as switches redraw continuously while the pointer moved over them.

Let anonymous elements use the existing paint-time hover transition
handler.
Only elements with persistent hover state now update that state and
notify from
prepaint. Add regression coverage for entering, moving within, and
leaving an
anonymous hover group.

Signed-off-by: Daan De Meyer <daan@amutable.com>

Release Notes:

- N/A

Signed-off-by: Daan De Meyer <daan@amutable.com>
```

## Parents

- [b05f40c5546b47bcf9561136dc0fcdcd9968cb63](https://git.cafe/gitcafe/zed/commit/b05f40c5546b47bcf9561136dc0fcdcd9968cb63?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ae3bbdeb2df000acd8e0c5c75275cbb357e2b223?format=markdown)
