summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>2020-11-01 20:21:56 -0500
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-02 07:13:40 +0200
commit8605b747b3eac83e6af7907de7659bfb989d0358 (patch)
tree347299311f9c104d3fb165c7fb38beee1051b1b7 /src/app.c
parent26d797bca21ff157d87c4cc1f5fa59e17b1b8e16 (diff)
Fix opening of mailto: links
This code path is used for opening both http/s and mailto links. On macOS, open is used generically handling both nicely. On Linux, x-www-browser was used for both, meaning it would attempt to open mailto links with the browser. This -does- work but is clunky. On my system, my defaults are Firefox for web and mutt for email, so if I clicked a mailto, Firefox would open (slow!) just to go out of focus as it opens mutt. Let's just mirror the macOS behaviour and use xdg-open for both kinds of links. Then the browser will be used for http/s and the mail client for mailto and everyone's happy. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/app.c b/src/app.c
index a6632811..c2d5b732 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1222,7 +1222,7 @@ void openInDefaultBrowser_App(const iString *url) {
1222#if defined (iPlatformApple) 1222#if defined (iPlatformApple)
1223 iClob(newStringsCStr_StringList("/usr/bin/open", cstr_String(url), NULL)) 1223 iClob(newStringsCStr_StringList("/usr/bin/open", cstr_String(url), NULL))
1224#elif defined (iPlatformLinux) || defined (iPlatformOther) 1224#elif defined (iPlatformLinux) || defined (iPlatformOther)
1225 iClob(newStringsCStr_StringList("/usr/bin/x-www-browser", cstr_String(url), NULL)) 1225 iClob(newStringsCStr_StringList("/usr/bin/xdg-open", cstr_String(url), NULL))
1226#elif defined (iPlatformMsys) 1226#elif defined (iPlatformMsys)
1227 iClob(newStringsCStr_StringList( 1227 iClob(newStringsCStr_StringList(
1228 concatPath_CStr(cstr_String(execPath_App()), "../urlopen.bat"), 1228 concatPath_CStr(cstr_String(execPath_App()), "../urlopen.bat"),