Repository: iced-rs/iced (language: rust)

Issue:
Tooltip does not request redraw when hovered
### Is your issue REALLY a bug?

- [X] My issue is indeed a bug!
- [X] I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

### Is there an existing issue for this?

- [X] I have searched the existing issues.

### Is this issue related to iced?

- [X] My hardware is compatible and my graphics drivers are up-to-date.

### What happened?

Tooltips do not appear if their content does not request redraw on hover.

```rust
use iced::widget::tooltip;
use iced::{application, Element, Task};

fn main() -> iced::Result {
    application("Tooltip", update, view).run()
}

fn update(_: &mut (), _: ()) -> Task<()> {
    Task::none()
}

fn view<'a>(_: &'a ()) -> Element<'a, ()> {
    tooltip("FooBar", "FizzBuzz", tooltip::Position::Bottom).into()
}
```

### What is the expected behavior?

The tooltip should appear regardless of if its content requests redraw. Adding `shell.request_redraw()` to `Tooltip::update` produces this behavior.

### Version

master

### Operating System

Windows

### Do you have any log output?

_No response_


Discussion / hints:
`scrollable::scroll_to` also does not reliably cause a redraw.

Fix patch:
diff --git a/widget/src/tooltip.rs b/widget/src/tooltip.rs
index e66f5e4ac6..4d5d9d82a3 100644
--- a/widget/src/tooltip.rs
+++ b/widget/src/tooltip.rs
@@ -213,6 +213,9 @@ where
 
         if was_idle != is_idle {
             shell.invalidate_layout();
+            shell.request_redraw();
+        } else if !is_idle && self.position == Position::FollowCursor {
+            shell.request_redraw();
         }
 
         self.content.as_widget_mut().update(


Test patch: