fix build sciter

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-09-17 13:41:00 +08:00
parent ae3efa1151
commit 72f5fbd6ad
4 changed files with 10 additions and 10 deletions

View File

@ -400,9 +400,9 @@ pub fn session_enter_or_leave(_session_id: SessionID, _enter: bool) -> SyncRetur
let keyboard_mode = session.get_keyboard_mode();
if _enter {
set_cur_session_id_(_session_id, &keyboard_mode);
session.enter(&keyboard_mode);
session.enter(keyboard_mode);
} else {
session.leave(&keyboard_mode);
session.leave(keyboard_mode);
}
}
SyncReturn(())

View File

@ -409,8 +409,8 @@ impl sciter::EventHandler for SciterSession {
fn login(String, String, String, bool);
fn new_rdp();
fn send_mouse(i32, i32, i32, bool, bool, bool, bool);
fn enter();
fn leave();
fn enter(String);
fn leave(String);
fn ctrl_alt_del();
fn transfer_file();
fn tunnel();

View File

@ -273,12 +273,12 @@ function handler.onMouse(evt)
case Event.MOUSE_ENTER:
entered = true;
stdout.println("enter");
handler.enter();
handler.enter(handler.get_keyboard_mode());
return keyboard_enabled;
case Event.MOUSE_LEAVE:
entered = false;
stdout.println("leave");
handler.leave();
handler.leave(handler.get_keyboard_mode());
if (is_left_down && handler.peer_platform() == "Android") {
is_left_down = false;
handler.send_mouse((1 << 3) | 2, 0, 0, evt.altKey,

View File

@ -572,15 +572,15 @@ impl<T: InvokeUiSession> Session<T> {
}
#[cfg(not(any(target_os = "android", target_os = "ios")))]
pub fn enter(&self, keyboard_mode: &str) {
pub fn enter(&self, keyboard_mode: String) {
IS_IN.store(true, Ordering::SeqCst);
keyboard::client::change_grab_status(GrabState::Run, keyboard_mode);
keyboard::client::change_grab_status(GrabState::Run, &keyboard_mode);
}
#[cfg(not(any(target_os = "android", target_os = "ios")))]
pub fn leave(&self, keyboard_mode: &str) {
pub fn leave(&self, keyboard_mode: String) {
IS_IN.store(false, Ordering::SeqCst);
keyboard::client::change_grab_status(GrabState::Wait, keyboard_mode);
keyboard::client::change_grab_status(GrabState::Wait, &keyboard_mode);
}
// flutter only TODO new input