mirror of
https://github.com/wez/wezterm.git
synced 2024-12-22 21:01:36 +03:00
fix hang with open crate when spawning the browser
The `open` crate blocks forever when spawning the browser via xdg-open, which feels kinda "wrong" to me, but does offer a method that can stick that in a background thread, so that's what we do here. refs: #1721
This commit is contained in:
parent
d22b7a51c5
commit
d290f532d4
@ -73,6 +73,7 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
* Fall back from `top_left_arrow` to `left_ptr` when loading XCursor themes [#1655](https://github.com/wez/wezterm/issues/1655)
|
||||
* Fixed lingering hover state in titlebar when the mouse pointer left the window. Thanks to [@davidrios](https://github.com/davidrios)! [#1434](https://github.com/wez/wezterm/issues/1434)
|
||||
* We now respect the difference between `Italic` and `Oblique` font styles when matching fonts. You may explicitly specify `style="Oblique"` rather than using `italic=true` for fonts that offer both italic and oblique variants. [#1646](https://github.com/wez/wezterm/issues/1646)
|
||||
* Hang when clicking a URL would launch the browser for the first time on unix systems [#1721](https://github.com/wez/wezterm/issues/1721)
|
||||
|
||||
### 20220101-133340-7edc5b5a
|
||||
|
||||
|
@ -2282,9 +2282,7 @@ impl TermWindow {
|
||||
};
|
||||
if default_click {
|
||||
log::info!("clicking {}", link);
|
||||
if let Err(err) = open::that(&link) {
|
||||
log::error!("failed to open {}: {:?}", link, err);
|
||||
}
|
||||
open::that_in_background(&link);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ async fn show_notif_impl(notif: ToastNotification) -> Result<(), Box<dyn std::er
|
||||
let args = signal.args()?;
|
||||
if args.nid == notification {
|
||||
if let Some(url) = notif.url.as_ref() {
|
||||
let _ = open::that(url);
|
||||
let _ = open::that_in_background(url);
|
||||
abort_closed.abort();
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user