mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
flutter_desktop: get double click time, win
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -804,8 +804,8 @@ pub fn main_is_root() -> bool {
|
||||
is_root()
|
||||
}
|
||||
|
||||
pub fn main_is_release() -> bool {
|
||||
is_release()
|
||||
pub fn get_double_click_time() -> SyncReturn<i32> {
|
||||
SyncReturn(crate::platform::get_double_click_time() as _)
|
||||
}
|
||||
|
||||
pub fn main_start_dbus_server() {
|
||||
|
||||
@@ -684,3 +684,10 @@ pub fn check_super_user_permission() -> ResultType<bool> {
|
||||
let status = std::process::Command::new("pkexec").arg(arg).status()?;
|
||||
Ok(status.success() && status.code() == Some(0))
|
||||
}
|
||||
|
||||
pub fn get_double_click_time() -> u32 {
|
||||
// to-do
|
||||
// GtkSettings *settings = gtk_settings_get_default ();
|
||||
// g_object_get (settings, "gtk-double-click-time", &double_click_time, NULL);
|
||||
500 as _
|
||||
}
|
||||
|
||||
@@ -537,3 +537,9 @@ pub fn quit_gui() {
|
||||
let () = msg_send!(NSApp(), terminate: nil);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
pub fn get_double_click_time() -> u32 {
|
||||
// to-do: https://github.com/servo/core-foundation-rs/blob/786895643140fa0ee4f913d7b4aeb0c4626b2085/cocoa/src/appkit.rs#L2823
|
||||
500 as _
|
||||
}
|
||||
|
||||
@@ -1632,3 +1632,7 @@ pub fn is_foreground_window_elevated() -> ResultType<bool> {
|
||||
fn get_current_pid() -> u32 {
|
||||
unsafe { GetCurrentProcessId() }
|
||||
}
|
||||
|
||||
pub fn get_double_click_time() -> u32 {
|
||||
unsafe { GetDoubleClickTime() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user