Merge remote-tracking branch 'origin/master'

This commit is contained in:
Yukino Song
2024-10-05 22:48:35 +08:00
38 changed files with 422 additions and 164 deletions

View File

@@ -362,6 +362,9 @@ const KeyCodeMap kKeyCodesMap[] = {
CGEventSetDoubleValueField(event, kCGMouseEventDeltaY, deltaY);
CGEventPost(kCGHIDEventTap, event);
// For why this is here, see:
// https://stackoverflow.com/questions/15194409/simulated-mouseevent-not-working-properly-osx
CGWarpMouseCursorPosition(location);
}
inline CGEventType

View File

@@ -23,7 +23,7 @@
#include "src/platform/common.h"
#include <boost/asio/ip/address.hpp>
#include <boost/process.hpp>
#include <boost/process/v1.hpp>
using namespace std::literals;
namespace fs = std::filesystem;
@@ -203,7 +203,7 @@ namespace platf {
boost::filesystem::path working_dir;
std::string cmd = R"(open ")" + url + R"(")";
boost::process::environment _env = boost::this_process::environment();
boost::process::v1::environment _env = boost::this_process::environment();
std::error_code ec;
auto child = run_command(false, false, cmd, working_dir, _env, nullptr, ec, nullptr);
if (ec) {