linebender / linebender/druid

`request_anim_frame()` prevents redrawing in multi-window

Open
#2,339 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

I have a custom widget that has an animation. After opening two windows with it inside, I found only the focused one was redrawn. The other ones won't redraw even if there's a data change. After deleting `request_anim_frame()`, it would redraw if there's a data change, but as a result, it's impossible for me to update my animation. Why would this happen? Is multi-window simply just doesn't supports animation or are there any options for me to enable it?

![image](https://user-images.githubusercontent.com/66859419/212983415-d332f8df-81c5-44fb-8ad4-a66ef346b22c.png)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the two-window custom-widget case with request_anim_frame() and trace how redraw requests are handled for focused and unfocused windows. Done means identifying the cause and establishing whether multi-window animation is supported or what change is needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.