Hyperlinks not working on Windows with request_repaint_after
Describe the bug
When clicking on an hyperlink on Windows, on version 0.19.0, I'm getting the following error:
thread 'main' panicked at 'either event handler is re-entrant (likely), or no event handler is registered (very unlikely)', <PATH_TO_REPO>\vendor\winit\src\platform_impl\windows\event_loop\runner.rs:242:18
To Reproduce
Create an agui app with an hyperlink, call request_repaint_after, and click it:
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
CentralPanel::default().show(ctx, |ui| {
let text = "Google";
let url = "https://www.google.com";
let link = Hyperlink::from_label_and_url(text, url);
ui.add(link);
});
ctx.request_repaint_after(Duration::from_millis(100));
}
Interesting!
Does it still happen if you replace request_repaint_after with request_repaint?
Does it still happen if you remove request_repaint_after?
Interesting!
Does it still happen if you replace
request_repaint_afterwithrequest_repaint? Does it still happen if you removerequest_repaint_after?
With ctx.request_repaint(); it does not happen. I've realized that after downgrading to 0.18 as I had tried links on that version before.