From 7ec57f8ddbfdfb266705aaa822c0cbbee28e4a24 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sun, 28 Feb 2021 16:15:20 +0100 Subject: [PATCH] Add support for opening url links on Linux --- Source/Engine/Platform/Linux/LinuxPlatform.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Engine/Platform/Linux/LinuxPlatform.cpp b/Source/Engine/Platform/Linux/LinuxPlatform.cpp index f6c6fdb39..a49d655dd 100644 --- a/Source/Engine/Platform/Linux/LinuxPlatform.cpp +++ b/Source/Engine/Platform/Linux/LinuxPlatform.cpp @@ -2057,12 +2057,15 @@ bool LinuxPlatform::GetHasFocus() bool LinuxPlatform::CanOpenUrl(const StringView& url) { - return false; + return true; } void LinuxPlatform::OpenUrl(const StringView& url) { - // TODO: add support for OpenUrl on Linux + const StringAsANSI<> urlAnsi(*url, url.Length()); + char cmd[2048]; + sprintf(cmd, "xdg-open %s", urlAnsi.Get()); + system(cmd); } Vector2 LinuxPlatform::GetMousePosition()