mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-11-07 06:39:10 +08:00
[fix] resolve cross-platform build warnings
This commit is contained in:
@@ -601,6 +601,9 @@ export component FileBrowserWindow inherits Window {
|
||||
SurfaceSeparator { x: 0px; y: 0px; width: parent.width; }
|
||||
focus := FocusScope {
|
||||
focus-on-click: true;
|
||||
// Window sizing is defined above. Keep its layout constraints separate
|
||||
// from children whose dimensions adapt to the current window size.
|
||||
x: 0px; y: 0px; width: root.width; height: root.height;
|
||||
key-pressed(event) => {
|
||||
if event.text == Key.Escape { root.cancel-drag(); return accept; }
|
||||
reject
|
||||
|
||||
@@ -141,7 +141,6 @@ export component TrustedDevicesDialog inherits Rectangle {
|
||||
// Extend into the right margin to preserve the existing card width.
|
||||
width: parent.width - 56px + dialog.scrollbar-gutter;
|
||||
height: parent.height - 84px;
|
||||
min-width: 0px; min-height: 0px;
|
||||
horizontal-scrollbar-policy: always-off;
|
||||
vertical-scrollbar-policy: as-needed;
|
||||
viewport-width: self.visible-width;
|
||||
|
||||
@@ -102,7 +102,11 @@ void Launch(const fs::path& executable, const std::vector<std::string>& argument
|
||||
}
|
||||
execv(executable.c_str(), argv.data());
|
||||
const int error = errno;
|
||||
(void)write(errors[1], &error, sizeof(error));
|
||||
// This small blocking pipe write is atomic. Retry signal interruptions so
|
||||
// the parent cannot mistake a failed exec for a successful launch.
|
||||
ssize_t written;
|
||||
do { written = write(errors[1], &error, sizeof(error)); }
|
||||
while (written < 0 && errno == EINTR);
|
||||
_exit(127);
|
||||
}
|
||||
close(errors[1]);
|
||||
|
||||
@@ -17,16 +17,16 @@ namespace crossdesk {
|
||||
class PlatformKeyboardCapturer final : public KeyboardCapturer {
|
||||
public:
|
||||
PlatformKeyboardCapturer();
|
||||
virtual ~PlatformKeyboardCapturer();
|
||||
~PlatformKeyboardCapturer() override;
|
||||
|
||||
public:
|
||||
virtual int Hook(OnKeyAction on_key_action, void* user_ptr);
|
||||
virtual int Unhook();
|
||||
int Hook(OnKeyAction on_key_action, void* user_ptr) override;
|
||||
int Unhook() override;
|
||||
bool SupportsTextInput() const override { return true; }
|
||||
int SendTextCommand(const std::string& text) override;
|
||||
virtual int SendKeyboardCommand(int key_code, bool is_down,
|
||||
uint32_t scan_code = 0,
|
||||
bool extended = false);
|
||||
int SendKeyboardCommand(int key_code, bool is_down,
|
||||
uint32_t scan_code = 0,
|
||||
bool extended = false) override;
|
||||
|
||||
private:
|
||||
CFMachPortRef event_tap_ = nullptr;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: DI JUNKUN
|
||||
* @Date: 2023-12-14
|
||||
* Copyright (c) 2023 by DI JUNKUN, All Rights Reserved.
|
||||
* Copyright (c) 2026 by DI JUNKUN, All Rights Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _MOUSE_CONTROLLER_H_
|
||||
@@ -20,15 +20,15 @@ namespace crossdesk {
|
||||
class PlatformMouseController final : public MouseController {
|
||||
public:
|
||||
PlatformMouseController();
|
||||
virtual ~PlatformMouseController();
|
||||
~PlatformMouseController() override;
|
||||
|
||||
public:
|
||||
virtual int Init(std::vector<DisplayInfo> display_info_list);
|
||||
virtual int Destroy();
|
||||
virtual int SendMouseCommand(RemoteAction remote_action, int display_index);
|
||||
int Init(std::vector<DisplayInfo> display_info_list) override;
|
||||
int Destroy() override;
|
||||
int SendMouseCommand(RemoteAction remote_action, int display_index) override;
|
||||
unsigned ReleasePressedButtons(unsigned mask = 7) override;
|
||||
void UpdateDisplayInfoList(
|
||||
const std::vector<DisplayInfo>& display_info_list);
|
||||
const std::vector<DisplayInfo>& display_info_list) override;
|
||||
|
||||
private:
|
||||
struct ClickTracker {
|
||||
|
||||
@@ -99,9 +99,6 @@ function setup_platform_settings()
|
||||
|
||||
add_cxflags("-Wno-unused-variable")
|
||||
elseif is_os("macosx") then
|
||||
if is_arch("x86_64") then
|
||||
add_ldflags("-Wl,-ld_classic")
|
||||
end
|
||||
add_cxflags("-Wno-unused-variable")
|
||||
add_frameworks("Cocoa", "CoreGraphics", "Metal", "QuartzCore", "IOKit",
|
||||
"IOSurface",
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
function setup_targets()
|
||||
includes("deps/submodules", "deps/thirdparty")
|
||||
|
||||
local crossdesk_version = get_config("CROSSDESK_VERSION") or "0.0.0"
|
||||
local version_define = "CROSSDESK_VERSION=\"" .. crossdesk_version .. "\""
|
||||
local windows_resource_defines = {
|
||||
|
||||
Reference in New Issue
Block a user