Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased
- `LogTicks` now work well with `pseudolog10` [#5135](https://github.com/MakieOrg/Makie.jl/pull/5135)
- Fix `display(figurelike)` causing the REPL to hang when using CairoMakie on a Linux system [#5281](https://github.com/MakieOrg/Makie.jl/pull/5281)

## [0.24.6] - 2025-08-19

Expand Down
29 changes: 22 additions & 7 deletions CairoMakie/src/display.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,26 @@
Try to run a command. Return `true` if `cmd` runs and is successful (exits with a code of `0`).
Return `false` otherwise.
"""
function tryrun(cmd::Cmd)
try
return success(cmd)
catch e
return false
function tryrun(cmd::Cmd; wait = true)
if wait
try
return success(cmd)
catch e
return false
end
else
proc = try
run(cmd; wait = false)
catch e
return false
end
sleep(1e-3)
if proc.exitcode == typemin(Int) || proc.exitcode == 0
# still running || ran successfully
return true
else
return false
end
end
end

Expand All @@ -21,8 +36,8 @@ function openurl(url::String)
elseif Sys.iswindows()
tryrun(`powershell.exe start $url`) && return
elseif Sys.isunix()
tryrun(`xdg-open $url`) && return
tryrun(`gnome-open $url`) && return
tryrun(`xdg-open $url`; wait = false) && return
tryrun(`gnome-open $url`; wait = false) && return
end
tryrun(`python -mwebbrowser $(url)`) && return
# our last hope
Expand Down